summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2019-08-06 19:52:24 -0400
committerMarek Olšák <marek.olsak@amd.com>2019-08-19 17:23:38 -0400
commit5a2e65be89d97ed5d7263f0296ea69ae8517187b (patch)
tree54e02039a464aad9cdfbfd275fdbc2100e35b5b3
parent8d0d753bd058961ac4e1274ac10f937711e0cc1b (diff)
radeonsi: don't emit PKT3_CONTEXT_CONTROL on amdgpu
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 19e568259c2..0ae89b821ff 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -5403,10 +5403,13 @@ static void si_init_config(struct si_context *sctx)
if (!pm4)
return;
- si_pm4_cmd_begin(pm4, PKT3_CONTEXT_CONTROL);
- si_pm4_cmd_add(pm4, CONTEXT_CONTROL_LOAD_ENABLE(1));
- si_pm4_cmd_add(pm4, CONTEXT_CONTROL_SHADOW_ENABLE(1));
- si_pm4_cmd_end(pm4, false);
+ /* Since amdgpu version 3.6.0, CONTEXT_CONTROL is emitted by the kernel */
+ if (!sscreen->info.is_amdgpu || sscreen->info.drm_minor < 6) {
+ si_pm4_cmd_begin(pm4, PKT3_CONTEXT_CONTROL);
+ si_pm4_cmd_add(pm4, CONTEXT_CONTROL_LOAD_ENABLE(1));
+ si_pm4_cmd_add(pm4, CONTEXT_CONTROL_SHADOW_ENABLE(1));
+ si_pm4_cmd_end(pm4, false);
+ }
if (has_clear_state) {
si_pm4_cmd_begin(pm4, PKT3_CLEAR_STATE);