summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen7_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-12 08:43:54 -0800
committerJason Ekstrand <[email protected]>2016-11-16 10:08:48 -0800
commit4a48d19d936baacaaf49ffb3ed8b152f59213564 (patch)
tree13eb84a2b87682f9346a3e39df0885e90ee9a37b /src/intel/vulkan/gen7_pipeline.c
parentc3e908e9d35bca6d4375d990ac86ffe406b5edab (diff)
anv/pipeline: Unify 3DSTATE_VS emission
With this commit, a few fields are now specified on gen7 which weren't before. However, the values specified are zero which is the default so the final hardware packet remains the same. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen7_pipeline.c')
-rw-r--r--src/intel/vulkan/gen7_pipeline.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c
index 2c96a8de6c7..d747c514f85 100644
--- a/src/intel/vulkan/gen7_pipeline.c
+++ b/src/intel/vulkan/gen7_pipeline.c
@@ -85,8 +85,6 @@ genX(graphics_pipeline_create)(
emit_ms_state(pipeline, pCreateInfo->pMultisampleState);
- const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline);
-
#if 0
/* From gen7_vs_state.c */
@@ -106,32 +104,7 @@ genX(graphics_pipeline_create)(
gen7_emit_vs_workaround_flush(brw);
#endif
- assert(anv_pipeline_has_stage(pipeline, MESA_SHADER_VERTEX));
- const struct anv_shader_bin *vs_bin =
- pipeline->shaders[MESA_SHADER_VERTEX];
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
- vs.KernelStartPointer = vs_bin->kernel.offset;
-
- vs.ScratchSpaceBasePointer = (struct anv_address) {
- .bo = anv_scratch_pool_alloc(device, &device->scratch_pool,
- MESA_SHADER_VERTEX,
- vs_prog_data->base.base.total_scratch),
- .offset = 0,
- };
- vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base);
-
- vs.DispatchGRFStartRegisterForURBData =
- vs_prog_data->base.base.dispatch_grf_start_reg;
-
- vs.SamplerCount = get_sampler_count(vs_bin);
- vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin);
-
- vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length;
- vs.VertexURBEntryReadOffset = 0;
- vs.MaximumNumberofThreads = devinfo->max_vs_threads - 1;
- vs.StatisticsEnable = true;
- vs.FunctionEnable = true;
- }
+ emit_3dstate_vs(pipeline);
const struct brw_gs_prog_data *gs_prog_data = get_gs_prog_data(pipeline);