diff options
author | Lionel Landwerlin <[email protected]> | 2019-02-15 13:47:48 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-02-18 12:18:13 +0000 |
commit | 8c87d029bcf4568f490414f9af0b9e042d304839 (patch) | |
tree | 18442ee69024da7ce61d10a14662dd691f6343c5 /src | |
parent | 0d8f09629377da9cf48ab4315574d69fdef5369d (diff) |
i965: scale factor changes should trigger recompile
Found by inspection.
Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: 3da858a6b990c5 ("intel/compiler: add scale_factors to sampler_prog_key_data")
Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 66fe5b3a8a0..51c3196e66a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1460,6 +1460,16 @@ key_debug(struct brw_context *brw, const char *name, int a, int b) return false; } +static inline bool +key_debug_float(struct brw_context *brw, const char *name, float a, float b) +{ + if (a != b) { + perf_debug(" %s %f->%f\n", name, a, b); + return true; + } + return false; +} + void brwInitFragProgFuncs( struct dd_function_table *functions ); void brw_get_scratch_bo(struct brw_context *brw, diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 9f88d625d63..3cd8f18e794 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -271,12 +271,17 @@ brw_debug_recompile_sampler_key(struct brw_context *brw, old_key->ayuv_image_mask, key->ayuv_image_mask); - for (unsigned int i = 0; i < MAX_SAMPLERS; i++) { found |= key_debug(brw, "textureGather workarounds", old_key->gen6_gather_wa[i], key->gen6_gather_wa[i]); } + for (unsigned int i = 0; i < MAX_SAMPLERS; i++) { + found |= key_debug_float(brw, "scale factor", + old_key->scale_factors[i], + key->scale_factors[i]); + } + return found; } |