r300g: fix random pixels appearing / incomplete rendering
[mesa.git] / src / gallium / drivers / i915 / i915_state_derived.c
index 03dd5091a611ba63de9eed9779ffabfff85e6e86..4da46772b5d8e049b806214b37e3b58c54474a97 100644 (file)
@@ -33,7 +33,6 @@
 #include "i915_context.h"
 #include "i915_state.h"
 #include "i915_reg.h"
-#include "i915_fpc.h"
 
 
 
@@ -102,14 +101,14 @@ static void calculate_vertex_layout( struct i915_context *i915 )
    /* primary color */
    if (colors[0]) {
       src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 0);
-      draw_emit_vertex_attr(&vinfo, EMIT_4UB, colorInterp, src);
+      draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, colorInterp, src);
       vinfo.hwfmt[0] |= S4_VFMT_COLOR;
    }
 
    /* secondary color */
    if (colors[1]) {
       src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 1);
-      draw_emit_vertex_attr(&vinfo, EMIT_4UB, colorInterp, src);
+      draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, colorInterp, src);
       vinfo.hwfmt[0] |= S4_VFMT_SPEC_FOG;
    }
 
@@ -158,10 +157,10 @@ void i915_update_derived( struct i915_context *i915 )
    if (i915->dirty & (I915_NEW_RASTERIZER | I915_NEW_FS | I915_NEW_VS))
       calculate_vertex_layout( i915 );
 
-   if (i915->dirty & (I915_NEW_SAMPLER | I915_NEW_TEXTURE))
+   if (i915->dirty & (I915_NEW_SAMPLER | I915_NEW_SAMPLER_VIEW))
       i915_update_samplers(i915);
 
-   if (i915->dirty & I915_NEW_TEXTURE)
+   if (i915->dirty & I915_NEW_SAMPLER_VIEW)
       i915_update_textures(i915);
 
    if (i915->dirty)