summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-04-11 11:51:26 -0700
committerKenneth Graunke <[email protected]>2019-04-11 15:03:27 -0700
commit4fcb749044c44a2d8d1908bfa0de2a0493502242 (patch)
tree853196074fae8d3609972c29ce6e9b034a138349 /src/gallium/drivers/iris
parent628c9ca9089789e0103a7de0cc479ff7a5ed0871 (diff)
iris: Actually pin the scratch BO.
We were pinning it for compute shaders, and pinning it when restoring saved buffers, but we never actually pinned it in the original batch for VS/TCS/TES/GS/FS. Fixes rendering in GFXBench5's Tessellation demo and a bunch of Piglit geometry shader tests.
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_state.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 381fae8c0ff..bf4fdcae1c9 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -4593,8 +4593,16 @@ iris_upload_dirty_render_state(struct iris_context *ice,
struct iris_compiled_shader *shader = ice->shaders.prog[stage];
if (shader) {
+ struct brw_stage_prog_data *prog_data = shader->prog_data;
struct iris_resource *cache = (void *) shader->assembly.res;
iris_use_pinned_bo(batch, cache->bo, false);
+
+ if (prog_data->total_scratch > 0) {
+ struct iris_bo *bo =
+ iris_get_scratch_space(ice, prog_data->total_scratch, stage);
+ iris_use_pinned_bo(batch, bo, true);
+ }
+
iris_batch_emit(batch, shader->derived_data,
iris_derived_program_state_size(stage));
} else {