Mesa (main): crocus/gen5: reemit shaders on gen5 after new program cache bo.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 11 02:54:16 UTC 2021


Module: Mesa
Branch: main
Commit: 7079286945211a9af38e0e8c22d14fa217c52e82
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7079286945211a9af38e0e8c22d14fa217c52e82

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Oct 11 12:05:30 2021 +1000

crocus/gen5: reemit shaders on gen5 after new program cache bo.

This fixes gtk4 programs.

Fixes: f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13281>

---

 src/gallium/drivers/crocus/crocus_program_cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/crocus/crocus_program_cache.c b/src/gallium/drivers/crocus/crocus_program_cache.c
index d2d4b821754..52d8bbf0b4c 100644
--- a/src/gallium/drivers/crocus/crocus_program_cache.c
+++ b/src/gallium/drivers/crocus/crocus_program_cache.c
@@ -155,10 +155,11 @@ crocus_cache_new_bo(struct crocus_context *ice,
    ice->shaders.cache_bo = new_bo;
    ice->shaders.cache_bo_map = map;
 
-   if (screen->devinfo.ver == 4) {
+   if (screen->devinfo.ver <= 5) {
       /* reemit all shaders on GEN4 only. */
       ice->state.dirty |= CROCUS_DIRTY_CLIP | CROCUS_DIRTY_RASTER |
          CROCUS_DIRTY_WM;
+      ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_VS;
    }
    ice->batches[CROCUS_BATCH_RENDER].state_base_address_emitted = false;
    ice->batches[CROCUS_BATCH_COMPUTE].state_base_address_emitted = false;



More information about the mesa-commit mailing list