**************************************************************************/
-#include "pipe/p_util.h"
+#include "util/u_memory.h"
#include "pipe/p_shader_tokens.h"
#include "draw/draw_context.h"
#include "draw/draw_vertex.h"
*/
static void calculate_vertex_layout( struct i915_context *i915 )
{
- const struct pipe_shader_state *fs = &i915->fs->state;
+ const struct i915_fragment_shader *fs = i915->fs;
const enum interp_mode colorInterp = i915->rasterizer->color_interp;
struct vertex_info vinfo;
boolean texCoords[8], colors[2], fog, needW;
/* Determine which fragment program inputs are needed. Setup HW vertex
* layout below, in the HW-specific attribute order.
*/
- for (i = 0; i < fs->num_inputs; i++) {
- switch (fs->input_semantic_name[i]) {
+ for (i = 0; i < fs->info.num_inputs; i++) {
+ switch (fs->info.input_semantic_name[i]) {
case TGSI_SEMANTIC_POSITION:
break;
case TGSI_SEMANTIC_COLOR:
- assert(fs->input_semantic_index[i] < 2);
- colors[fs->input_semantic_index[i]] = TRUE;
+ assert(fs->info.input_semantic_index[i] < 2);
+ colors[fs->info.input_semantic_index[i]] = TRUE;
break;
case TGSI_SEMANTIC_GENERIC:
/* usually a texcoord */
{
- const uint unit = fs->input_semantic_index[i];
+ const uint unit = fs->info.input_semantic_index[i];
assert(unit < 8);
texCoords[unit] = TRUE;
needW = TRUE;
if (needW) {
draw_emit_vertex_attr(&vinfo, EMIT_4F, INTERP_LINEAR, src);
vinfo.hwfmt[0] |= S4_VFMT_XYZW;
- vinfo.emit[0] = EMIT_4F;
+ vinfo.attrib[0].emit = EMIT_4F;
}
else {
draw_emit_vertex_attr(&vinfo, EMIT_3F, INTERP_LINEAR, src);
vinfo.hwfmt[0] |= S4_VFMT_XYZ;
- vinfo.emit[0] = EMIT_3F;
+ vinfo.attrib[0].emit = EMIT_3F;
}
/* hardware point size */