diff --git a/.pick_status.json b/.pick_status.json index 5757ba5b9a3..0eb19960859 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3794,7 +3794,7 @@ "description": "anv: enable preemption setting on command/batch correctly", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index 877f4a304ef..f2e0d395933 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -144,10 +144,6 @@ genX(streamout_prologue)(struct anv_cmd_buffer *cmd_buffer) #if INTEL_WA_16013994831_GFX_VER /* Wa_16013994831 - Disable preemption during streamout, enable back * again if XFB not used by the current pipeline. - * - * Although this workaround applies to Gfx12+, we already disable object - * level preemption for another reason in genX_state.c so we can skip this - * for Gfx12. */ if (!intel_needs_workaround(cmd_buffer->device->info, 16013994831)) return; diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c index 8395575379e..21dd4468622 100644 --- a/src/intel/vulkan/genX_gpu_memcpy.c +++ b/src/intel/vulkan/genX_gpu_memcpy.c @@ -101,12 +101,6 @@ emit_common_so_memcpy(struct anv_memcpy_state *state, } #endif -#if INTEL_WA_16013994831_GFX_VER - /* Wa_16013994831 - Disable preemption during streamout. */ - if (intel_needs_workaround(device->info, 16013994831)) - genX(batch_set_preemption)(batch, device, _3D, false); -#endif - anv_batch_emit(batch, GENX(3DSTATE_SBE), sbe) { sbe.VertexURBEntryReadOffset = 1; sbe.NumberofSFOutputAttributes = 1; @@ -283,6 +277,9 @@ genX(emit_so_memcpy_init)(struct anv_memcpy_state *state, state->device = device; if (state->cmd_buffer) { + /* Wa_16013994831 - Disable preemption during streamout. */ + genX(cmd_buffer_set_preemption)(cmd_buffer, false); + if (!cmd_buffer->state.current_l3_config) { genX(cmd_buffer_config_l3)(cmd_buffer, intel_get_default_l3_config(device->info)); @@ -291,6 +288,12 @@ genX(emit_so_memcpy_init)(struct anv_memcpy_state *state, &state->cmd_buffer->state.gfx.urb_cfg, cmd_buffer->state.current_l3_config); } else { +#if INTEL_WA_16013994831_GFX_VER + /* Wa_16013994831 - Disable preemption during streamout. */ + if (intel_needs_workaround(device->info, 16013994831)) + genX(batch_set_preemption)(batch, device, _3D, false); +#endif + const struct intel_l3_config *cfg = intel_get_default_l3_config(device->info); genX(emit_l3_config)(batch, device, cfg); genX(emit_pipeline_select)(batch, _3D, device); @@ -357,8 +360,11 @@ genX(emit_so_memcpy_fini)(struct anv_memcpy_state *state) void genX(emit_so_memcpy_end)(struct anv_memcpy_state *state) { +#if INTEL_WA_16013994831_GFX_VER + /* Turn preemption back on when we're done */ if (intel_needs_workaround(state->device->info, 16013994831)) genX(batch_set_preemption)(state->batch, state->device, _3D, true); +#endif anv_batch_emit(state->batch, GENX(MI_BATCH_BUFFER_END), end); diff --git a/src/intel/vulkan/genX_simple_shader.c b/src/intel/vulkan/genX_simple_shader.c index 72c39d2aa57..4fe2ce21085 100644 --- a/src/intel/vulkan/genX_simple_shader.c +++ b/src/intel/vulkan/genX_simple_shader.c @@ -38,6 +38,9 @@ genX(emit_simpler_shader_init_fragment)(struct anv_simple_shader *state) { assert(state->cmd_buffer && state->cmd_buffer->state.current_pipeline == _3D); + /* Wa_16013994831 - Turn preemption on if it was previous left disabled. */ + genX(cmd_buffer_set_preemption)(state->cmd_buffer, true); + struct anv_batch *batch = state->batch; struct anv_device *device = state->device; const struct brw_wm_prog_data *prog_data =