diff options
author | Marek Olšák <[email protected]> | 2019-07-12 15:42:44 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-19 20:16:35 -0400 |
commit | 98377d345002e8db5bce396241f5e61d9f3bd32a (patch) | |
tree | fa7581219ba4ce338fa057d669b765fa0e703d93 | |
parent | d227b91d2ef07070c8e98d71d7e9949a6eb04fc3 (diff) |
radeonsi: save the enable_nir option in the shader cache correctly
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Acked-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 8bd9828f853..d13b008965b 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -849,8 +849,12 @@ static void si_disk_cache_create(struct si_screen *sscreen) DBG(SI_SCHED) | \ DBG(GISEL) | \ DBG(UNSAFE_MATH)) - uint64_t shader_debug_flags = sscreen->debug_flags & - ALL_FLAGS; + uint64_t shader_debug_flags = sscreen->debug_flags & ALL_FLAGS; + + if (sscreen->options.enable_nir) { + STATIC_ASSERT((ALL_FLAGS & (1u << 31)) == 0); + shader_debug_flags |= 1u << 31; + } /* Add the high bits of 32-bit addresses, which affects * how 32-bit addresses are expanded to 64 bits. @@ -859,9 +863,6 @@ static void si_disk_cache_create(struct si_screen *sscreen) assert((int16_t)sscreen->info.address32_hi == (int32_t)sscreen->info.address32_hi); shader_debug_flags |= (uint64_t)(sscreen->info.address32_hi & 0xffff) << 32; - if (sscreen->options.enable_nir) - shader_debug_flags |= 1ull << 48; - sscreen->disk_shader_cache = disk_cache_create(sscreen->info.name, cache_id, |