diff options
Diffstat (limited to 'src/gallium/state_trackers/nine/pixelshader9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/pixelshader9.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/pixelshader9.c b/src/gallium/state_trackers/nine/pixelshader9.c index 42ad2c76a7f..4b85c738f79 100644 --- a/src/gallium/state_trackers/nine/pixelshader9.c +++ b/src/gallium/state_trackers/nine/pixelshader9.c @@ -80,13 +80,14 @@ NinePixelShader9_ctor( struct NinePixelShader9 *This, This->variant.cso = info.cso; This->variant.const_ranges = info.const_ranges; + This->variant.const_used_size = info.const_used_size; This->last_cso = info.cso; This->last_const_ranges = info.const_ranges; + This->last_const_used_size = info.const_used_size; This->last_key = 0; This->sampler_mask = info.sampler_mask; This->rt_mask = info.rt_mask; - This->const_used_size = info.const_used_size; This->bumpenvmat_needed = info.bumpenvmat_needed; memcpy(This->int_slots_used, info.int_slots_used, sizeof(This->int_slots_used)); @@ -159,7 +160,9 @@ NinePixelShader9_GetFunction( struct NinePixelShader9 *This, } void * -NinePixelShader9_GetVariant( struct NinePixelShader9 *This, unsigned **const_ranges ) +NinePixelShader9_GetVariant( struct NinePixelShader9 *This, + unsigned **const_ranges, + unsigned *const_used_size ) { /* GetVariant is called from nine_context, thus we can * get pipe directly */ @@ -170,10 +173,11 @@ NinePixelShader9_GetVariant( struct NinePixelShader9 *This, unsigned **const_ran key = This->next_key; if (key == This->last_key) { *const_ranges = This->last_const_ranges; + *const_used_size = This->last_const_used_size; return This->last_cso; } - cso = nine_shader_variant_get(&This->variant, const_ranges, key); + cso = nine_shader_variant_get(&This->variant, const_ranges, const_used_size, key); if (!cso) { struct NineDevice9 *device = This->base.device; struct nine_shader_info info; @@ -210,14 +214,17 @@ NinePixelShader9_GetVariant( struct NinePixelShader9 *This, unsigned **const_ran hr = nine_translate_shader(This->base.device, &info, pipe); if (FAILED(hr)) return NULL; - nine_shader_variant_add(&This->variant, key, info.cso, info.const_ranges); + nine_shader_variant_add(&This->variant, key, info.cso, + info.const_ranges, info.const_used_size); cso = info.cso; *const_ranges = info.const_ranges; + *const_used_size = info.const_used_size; } This->last_key = key; This->last_cso = cso; This->last_const_ranges = *const_ranges; + This->last_const_used_size = *const_used_size; return cso; } |