From a09152815d99b8a68f7f5ed0e44bab39dd14a1e5 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 21 Apr 2022 04:23:05 +0000 Subject: Import Mesa 21.3.8 --- lib/mesa/src/gallium/drivers/iris/iris_program.c | 3 ++- lib/mesa/src/gallium/drivers/iris/iris_state.c | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/mesa/src/gallium/drivers/iris') diff --git a/lib/mesa/src/gallium/drivers/iris/iris_program.c b/lib/mesa/src/gallium/drivers/iris/iris_program.c index a5e1dc137..973999bcc 100644 --- a/lib/mesa/src/gallium/drivers/iris/iris_program.c +++ b/lib/mesa/src/gallium/drivers/iris/iris_program.c @@ -2820,7 +2820,8 @@ iris_bind_vs_state(struct pipe_context *ctx, void *state) if (ice->state.vs_uses_draw_params != uses_draw_params || ice->state.vs_uses_derived_draw_params != uses_derived_draw_params || - ice->state.vs_needs_edge_flag != info->vs.needs_edge_flag) { + ice->state.vs_needs_edge_flag != info->vs.needs_edge_flag || + ice->state.vs_needs_sgvs_element != needs_sgvs_element) { ice->state.dirty |= IRIS_DIRTY_VERTEX_BUFFERS | IRIS_DIRTY_VERTEX_ELEMENTS; } diff --git a/lib/mesa/src/gallium/drivers/iris/iris_state.c b/lib/mesa/src/gallium/drivers/iris/iris_state.c index 40dc2d062..de553f320 100644 --- a/lib/mesa/src/gallium/drivers/iris/iris_state.c +++ b/lib/mesa/src/gallium/drivers/iris/iris_state.c @@ -6922,10 +6922,9 @@ iris_upload_compute_walker(struct iris_context *ice, iris_emit_cmd(batch, GENX(CFE_STATE), cfe) { cfe.MaximumNumberofThreads = devinfo->max_cs_threads * devinfo->subslice_total - 1; - if (prog_data->total_scratch > 0) { - cfe.ScratchSpaceBuffer = - iris_get_scratch_surf(ice, prog_data->total_scratch)->offset >> 4; - } + uint32_t scratch_addr = pin_scratch_space(ice, batch, prog_data, + MESA_SHADER_COMPUTE); + cfe.ScratchSpaceBuffer = scratch_addr >> 4; } } -- cgit v1.2.3