From 45c0f60999587ed29a7a9b81f09950dd8f58fb49 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 16 Jun 2016 14:58:25 -0700 Subject: [PATCH] genxml: Make ScratchSpaceBasePointer an address instead of an offset While we're here, we also fixup MEDIA_VFE_STATE and rename the field in 3DSTATE_VS on gen6-7.5 to be consistent with the others. Signed-off-by: Jason Ekstrand Cc: "12.0" --- src/intel/genxml/gen6.xml | 8 ++++---- src/intel/genxml/gen7.xml | 12 ++++++------ src/intel/genxml/gen75.xml | 12 ++++++------ src/intel/genxml/gen8.xml | 13 ++++++------- src/intel/genxml/gen9.xml | 13 ++++++------- src/intel/vulkan/gen7_pipeline.c | 18 +++++++++++++++--- src/intel/vulkan/gen8_pipeline.c | 15 ++++++++++++--- src/intel/vulkan/genX_pipeline.c | 6 ++++-- 8 files changed, 59 insertions(+), 38 deletions(-) diff --git a/src/intel/genxml/gen6.xml b/src/intel/genxml/gen6.xml index 7525fce6b19..44e28048ac5 100644 --- a/src/intel/genxml/gen6.xml +++ b/src/intel/genxml/gen6.xml @@ -971,7 +971,7 @@ - + @@ -1346,7 +1346,7 @@ - + @@ -1378,7 +1378,7 @@ - + @@ -1578,7 +1578,7 @@ - + diff --git a/src/intel/genxml/gen7.xml b/src/intel/genxml/gen7.xml index 87057f3c725..2bbfcb7606a 100644 --- a/src/intel/genxml/gen7.xml +++ b/src/intel/genxml/gen7.xml @@ -1113,7 +1113,7 @@ - + @@ -1153,7 +1153,7 @@ - + @@ -1220,7 +1220,7 @@ - + @@ -1354,7 +1354,7 @@ - + @@ -1858,7 +1858,7 @@ - + @@ -2109,7 +2109,7 @@ - + diff --git a/src/intel/genxml/gen75.xml b/src/intel/genxml/gen75.xml index dcceea5b4bb..9ab432cacb0 100644 --- a/src/intel/genxml/gen75.xml +++ b/src/intel/genxml/gen75.xml @@ -1231,7 +1231,7 @@ - + @@ -1362,7 +1362,7 @@ - + @@ -1435,7 +1435,7 @@ - + @@ -1573,7 +1573,7 @@ - + @@ -2121,7 +2121,7 @@ - + @@ -2396,7 +2396,7 @@ - + diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml index 09671ba5181..80d40fbac55 100644 --- a/src/intel/genxml/gen8.xml +++ b/src/intel/genxml/gen8.xml @@ -1265,7 +1265,7 @@ - + @@ -1405,7 +1405,7 @@ - + @@ -1484,7 +1484,7 @@ - + @@ -1607,7 +1607,7 @@ - + @@ -2265,7 +2265,7 @@ - + @@ -2601,10 +2601,9 @@ - + - diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml index f527838fbfd..94b7d289086 100644 --- a/src/intel/genxml/gen9.xml +++ b/src/intel/genxml/gen9.xml @@ -1320,7 +1320,7 @@ - + @@ -1507,7 +1507,7 @@ - + @@ -1587,7 +1587,7 @@ - + @@ -1717,7 +1717,7 @@ - + @@ -2519,7 +2519,7 @@ - + @@ -2868,10 +2868,9 @@ - + - diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c index dd34d713d47..56e59a4bab5 100644 --- a/src/intel/vulkan/gen7_pipeline.c +++ b/src/intel/vulkan/gen7_pipeline.c @@ -250,7 +250,11 @@ genX(graphics_pipeline_create)( else anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) { vs.KernelStartPointer = pipeline->vs_vec4; - vs.ScratchSpaceBaseOffset = pipeline->scratch_start[MESA_SHADER_VERTEX]; + + vs.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_VERTEX], + }; vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base); vs.DispatchGRFStartRegisterforURBData = @@ -270,7 +274,11 @@ genX(graphics_pipeline_create)( } else { anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS), gs) { gs.KernelStartPointer = pipeline->gs_kernel; - gs.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_GEOMETRY]; + + gs.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_GEOMETRY], + }; gs.PerThreadScratchSpace = scratch_space(&gs_prog_data->base.base); gs.OutputVertexSize = gs_prog_data->output_vertex_size_hwords * 2 - 1; @@ -328,7 +336,11 @@ genX(graphics_pipeline_create)( anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PS), ps) { ps.KernelStartPointer0 = pipeline->ps_ksp0; - ps.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_FRAGMENT]; + + ps.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_FRAGMENT], + }; ps.PerThreadScratchSpace = scratch_space(&wm_prog_data->base); ps.MaximumNumberofThreads = device->info.max_wm_threads - 1; ps.PushConstantEnable = wm_prog_data->base.nr_params > 0; diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c index 2a96be0d9d9..53fca2b46e8 100644 --- a/src/intel/vulkan/gen8_pipeline.c +++ b/src/intel/vulkan/gen8_pipeline.c @@ -360,7 +360,10 @@ genX(graphics_pipeline_create)( gs.BindingTableEntryCount = 0; gs.ExpectedVertexCount = gs_prog_data->vertices_in; - gs.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_GEOMETRY]; + gs.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_GEOMETRY], + }; gs.PerThreadScratchSpace = scratch_space(&gs_prog_data->base.base); gs.OutputVertexSize = gs_prog_data->output_vertex_size_hwords * 2 - 1; gs.OutputTopology = gs_prog_data->output_topology; @@ -427,7 +430,10 @@ genX(graphics_pipeline_create)( vs.AccessesUAV = false; vs.SoftwareExceptionEnable = false; - vs.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_VERTEX], + vs.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_VERTEX], + }; vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base); vs.DispatchGRFStartRegisterForURBData = @@ -476,7 +482,10 @@ genX(graphics_pipeline_create)( ps.MaximumNumberofThreadsPerPSD = 64 - num_thread_bias; - ps.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_FRAGMENT]; + ps.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_FRAGMENT], + }; ps.PerThreadScratchSpace = scratch_space(&wm_prog_data->base); ps.DispatchGRFStartRegisterForConstantSetupData0 = diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 458e80c82b1..736044889b8 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -102,10 +102,12 @@ genX(compute_pipeline_create)( cs_prog_data->push.cross_thread.regs, 2); anv_batch_emit(&pipeline->batch, GENX(MEDIA_VFE_STATE), vfe) { - vfe.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_COMPUTE]; + vfe.ScratchSpaceBasePointer = (struct anv_address) { + .bo = NULL, + .offset = pipeline->scratch_start[MESA_SHADER_COMPUTE], + }; vfe.PerThreadScratchSpace = ffs(cs_prog_data->base.total_scratch / 2048); #if GEN_GEN > 7 - vfe.ScratchSpaceBasePointerHigh = 0; vfe.StackSize = 0; #else vfe.GPGPUMode = true; -- 2.30.2