diff options
author | Kenneth Graunke <[email protected]> | 2018-11-03 06:44:48 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:09 -0800 |
commit | 84a419432deffd47f166819e432a5f927f149263 (patch) | |
tree | 9f80f263aa5c2f2ba336907efdf5f0c9c1791ad0 | |
parent | 317ba8796f5572e657c0bfae643c2e2917157c7c (diff) |
iris: Flag constants dirty on program changes
3DSTATE_CONSTANT_* looks at prog_data->ubo_ranges. We were getting
saved by iris_set_constant_buffers() usually happening when changing
programs (as they usually change uniforms too), but with the clear
shader that doesn't use uniforms, we weren't getting one and were
leaving push constants enabled, screwing things up.
Also clean up a bit of a mess left by the hacks - we were missing
bindings in the VS/FS/CS case, among other issues...
-rw-r--r-- | src/gallium/drivers/iris/iris_program_cache.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/iris/iris_program_cache.c b/src/gallium/drivers/iris/iris_program_cache.c index 9fad14a2847..f5c6fc26794 100644 --- a/src/gallium/drivers/iris/iris_program_cache.c +++ b/src/gallium/drivers/iris/iris_program_cache.c @@ -106,20 +106,19 @@ dirty_flag_for_cache(enum iris_program_cache_id cache_id) { assert(cache_id <= MESA_SHADER_STAGES); + uint64_t flags = (IRIS_DIRTY_VS | + IRIS_DIRTY_BINDINGS_VS | + IRIS_DIRTY_CONSTANTS_VS) << cache_id; // XXX: ugly... // XXX: move this flagging out to a higher level, allow comparison of // XXX: new and old programs to decide what bits to twiddle // XXX: CLIP: toggle if barycentric modes has any NONPERSPECTIVE or not if (cache_id == IRIS_CACHE_FS) - return IRIS_DIRTY_WM | IRIS_DIRTY_FS | IRIS_DIRTY_CLIP | IRIS_DIRTY_SBE; + flags |= IRIS_DIRTY_WM | IRIS_DIRTY_CLIP | IRIS_DIRTY_SBE; if (cache_id == IRIS_CACHE_VS) - return IRIS_DIRTY_VS | IRIS_DIRTY_VF_SGVS; + flags |= IRIS_DIRTY_VF_SGVS; - /* For compute, prog_data->threads needs to be uploaded as constants. */ - if (cache_id == IRIS_CACHE_CS) - return IRIS_DIRTY_CS | IRIS_DIRTY_CONSTANTS_CS; - - return IRIS_DIRTY_VS << cache_id | IRIS_DIRTY_BINDINGS_VS << cache_id; + return flags; } static unsigned |