summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-12 13:33:16 -0800
committerJason Ekstrand <[email protected]>2016-11-16 10:09:18 -0800
commitba349e106ec2aa48798676dd33edcf643d168b8e (patch)
tree1468c9e247333c739db7166163651e91d9be5300 /src/intel/vulkan
parentd33e2ad67c3621a01648292ece2148aa8b7d2fdb (diff)
anv/pipeline: Use get_scratch_space/address for compute shaders
Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/genX_pipeline.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 2cc5c7d4ef0..8cb8de06cc9 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -1446,14 +1446,10 @@ compute_pipeline_create(
const uint32_t subslices = MAX2(physical_device->subslice_total, 1);
+ const struct anv_shader_bin *cs_bin =
+ pipeline->shaders[MESA_SHADER_COMPUTE];
+
anv_batch_emit(&pipeline->batch, GENX(MEDIA_VFE_STATE), vfe) {
- vfe.ScratchSpaceBasePointer = (struct anv_address) {
- .bo = anv_scratch_pool_alloc(device, &device->scratch_pool,
- MESA_SHADER_COMPUTE,
- cs_prog_data->base.total_scratch),
- .offset = 0,
- };
- vfe.PerThreadScratchSpace = ffs(cs_prog_data->base.total_scratch / 2048);
#if GEN_GEN > 7
vfe.StackSize = 0;
#else
@@ -1468,10 +1464,12 @@ compute_pipeline_create(
#endif
vfe.URBEntryAllocationSize = GEN_GEN <= 7 ? 0 : 2;
vfe.CURBEAllocationSize = vfe_curbe_allocation;
+
+ vfe.PerThreadScratchSpace = get_scratch_space(cs_bin);
+ vfe.ScratchSpaceBasePointer =
+ get_scratch_address(pipeline, MESA_SHADER_COMPUTE, cs_bin);
}
- const struct anv_shader_bin *cs_bin =
- pipeline->shaders[MESA_SHADER_COMPUTE];
struct GENX(INTERFACE_DESCRIPTOR_DATA) desc = {
.KernelStartPointer = cs_bin->kernel.offset,