summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_state_derived.c
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2008-02-22 16:48:05 -0700
committerBrian <brian@i915.localnet.net>2008-02-22 16:48:05 -0700
commitc74900ee5d80c7c2b7cbe4ed87395526a742a13e (patch)
tree5d3a1102eb01278587f8978ce47b444c7d27fb92 /src/gallium/drivers/i915simple/i915_state_derived.c
parent8cd7c1d03ce045bfa39471c3f77a31030195b899 (diff)
gallium/i915: overhaul of fragment shader compilation, constant/immediate allocation
Before, fragment shaders were translated to i915 hw code at bind time, rather than create time. Now there's an i915_fragment_shader struct with the expected contents that's created by i915_create_fs_state(). Translation to i915 code takes place there too. Immediates are handled correctly now. During program translation we keep track of which constant buffer slots are free (i.e. not referenced by the shader). Then the TGSI immediates and ancillary immediates (introduced for SIN/COS/etc) are put into those free slots. When it's time to upload the constant buffer, use the fp->constant_flags[] array to determine if we should grab an immediate from the shader, or a user-defined parameter from the gallium constant buffer.
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_state_derived.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_state_derived.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state_derived.c b/src/gallium/drivers/i915simple/i915_state_derived.c
index 4767584fc60..f654f543cc6 100644
--- a/src/gallium/drivers/i915simple/i915_state_derived.c
+++ b/src/gallium/drivers/i915simple/i915_state_derived.c
@@ -43,7 +43,7 @@
*/
static void calculate_vertex_layout( struct i915_context *i915 )
{
- const struct pipe_shader_state *fs = i915->fs;
+ const struct pipe_shader_state *fs = &i915->fs->state;
const enum interp_mode colorInterp = i915->rasterizer->color_interp;
struct vertex_info vinfo;
uint front0 = 0, back0 = 0, front1 = 0, back1 = 0;
@@ -164,7 +164,6 @@ void i915_update_derived( struct i915_context *i915 )
i915_update_dynamic( i915 );
if (i915->dirty & I915_NEW_FS) {
- i915_translate_fragment_program(i915);
i915->hardware_dirty |= I915_HW_PROGRAM; /* XXX right? */
}