diff options
author | Marek Olšák <[email protected]> | 2017-12-05 13:32:47 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-12-06 15:19:02 +0100 |
commit | 3e1287caefed01a5f6218e2911ec8409c63ad397 (patch) | |
tree | 0a3b903b1f178f3450d04e97303a0fa120eb82b3 /src/gallium/drivers/radeon | |
parent | fef51ebceabb64256f80aa046723118f57ab4594 (diff) |
radeonsi/gfx9: make shader binaries use read-only memory
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 09075f3ea29..aca536d7fd4 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -174,6 +174,9 @@ void si_init_resource_fields(struct si_screen *sscreen, if (sscreen->debug_flags & DBG(NO_WC)) res->flags &= ~RADEON_FLAG_GTT_WC; + if (res->b.b.flags & R600_RESOURCE_FLAG_READ_ONLY) + res->flags |= RADEON_FLAG_READ_ONLY; + /* Set expected VRAM and GART usage for the buffer. */ res->vram_usage = 0; res->gart_usage = 0; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 498a7418c0a..d1fdea074e9 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -53,6 +53,7 @@ struct si_context; #define R600_RESOURCE_FLAG_FORCE_TILING (PIPE_RESOURCE_FLAG_DRV_PRIV << 2) #define R600_RESOURCE_FLAG_DISABLE_DCC (PIPE_RESOURCE_FLAG_DRV_PRIV << 3) #define R600_RESOURCE_FLAG_UNMAPPABLE (PIPE_RESOURCE_FLAG_DRV_PRIV << 4) +#define R600_RESOURCE_FLAG_READ_ONLY (PIPE_RESOURCE_FLAG_DRV_PRIV << 5) /* Debug flags. */ enum { |