anv/pipeline: Stop claiming to support running without a vertex shader
From the Vulkan spec version 1.0.32 docs for vkCreateGraphicsPipelines: The stage member of one element of pStages must be VK_SHADER_STAGE_VERTEX_BIT Since a vertex shader is always required, this hasn't been used since we deleted meta. Let's get rid of the complexity. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
bda247d3fd
commit
23d1919fe3
|
@ -106,35 +106,31 @@ genX(graphics_pipeline_create)(
|
||||||
gen7_emit_vs_workaround_flush(brw);
|
gen7_emit_vs_workaround_flush(brw);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!anv_pipeline_has_stage(pipeline, MESA_SHADER_VERTEX)) {
|
assert(anv_pipeline_has_stage(pipeline, MESA_SHADER_VERTEX));
|
||||||
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs);
|
const struct anv_shader_bin *vs_bin =
|
||||||
} else {
|
pipeline->shaders[MESA_SHADER_VERTEX];
|
||||||
const struct anv_shader_bin *vs_bin =
|
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
|
||||||
pipeline->shaders[MESA_SHADER_VERTEX];
|
vs.KernelStartPointer = vs_bin->kernel.offset;
|
||||||
|
|
||||||
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
|
vs.ScratchSpaceBasePointer = (struct anv_address) {
|
||||||
vs.KernelStartPointer = vs_bin->kernel.offset;
|
.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.ScratchSpaceBasePointer = (struct anv_address) {
|
vs.DispatchGRFStartRegisterForURBData =
|
||||||
.bo = anv_scratch_pool_alloc(device, &device->scratch_pool,
|
vs_prog_data->base.base.dispatch_grf_start_reg;
|
||||||
MESA_SHADER_VERTEX,
|
|
||||||
vs_prog_data->base.base.total_scratch),
|
|
||||||
.offset = 0,
|
|
||||||
};
|
|
||||||
vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base);
|
|
||||||
|
|
||||||
vs.DispatchGRFStartRegisterForURBData =
|
vs.SamplerCount = get_sampler_count(vs_bin);
|
||||||
vs_prog_data->base.base.dispatch_grf_start_reg;
|
vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin);
|
||||||
|
|
||||||
vs.SamplerCount = get_sampler_count(vs_bin);
|
vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length;
|
||||||
vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin);
|
vs.VertexURBEntryReadOffset = 0;
|
||||||
|
vs.MaximumNumberofThreads = devinfo->max_vs_threads - 1;
|
||||||
vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length;
|
vs.StatisticsEnable = true;
|
||||||
vs.VertexURBEntryReadOffset = 0;
|
vs.FunctionEnable = true;
|
||||||
vs.MaximumNumberofThreads = devinfo->max_vs_threads - 1;
|
|
||||||
vs.StatisticsEnable = true;
|
|
||||||
vs.FunctionEnable = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct brw_gs_prog_data *gs_prog_data = get_gs_prog_data(pipeline);
|
const struct brw_gs_prog_data *gs_prog_data = get_gs_prog_data(pipeline);
|
||||||
|
|
|
@ -177,60 +177,50 @@ genX(graphics_pipeline_create)(
|
||||||
offset = 1;
|
offset = 1;
|
||||||
length = (vs_prog_data->base.vue_map.num_slots + 1) / 2 - offset;
|
length = (vs_prog_data->base.vue_map.num_slots + 1) / 2 - offset;
|
||||||
|
|
||||||
if (!anv_pipeline_has_stage(pipeline, MESA_SHADER_VERTEX)) {
|
assert(anv_pipeline_has_stage(pipeline, MESA_SHADER_VERTEX));
|
||||||
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
|
const struct anv_shader_bin *vs_bin =
|
||||||
vs.FunctionEnable = false;
|
pipeline->shaders[MESA_SHADER_VERTEX];
|
||||||
/* Even if VS is disabled, SBE still gets the amount of
|
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
|
||||||
* vertex data to read from this field. */
|
vs.KernelStartPointer = vs_bin->kernel.offset;
|
||||||
vs.VertexURBEntryOutputReadOffset = offset;
|
vs.SingleVertexDispatch = false;
|
||||||
vs.VertexURBEntryOutputLength = length;
|
vs.VectorMaskEnable = false;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const struct anv_shader_bin *vs_bin =
|
|
||||||
pipeline->shaders[MESA_SHADER_VERTEX];
|
|
||||||
|
|
||||||
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), vs) {
|
vs.SamplerCount = get_sampler_count(vs_bin);
|
||||||
vs.KernelStartPointer = vs_bin->kernel.offset;
|
vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin);
|
||||||
vs.SingleVertexDispatch = false;
|
|
||||||
vs.VectorMaskEnable = false;
|
|
||||||
|
|
||||||
vs.SamplerCount = get_sampler_count(vs_bin);
|
vs.ThreadDispatchPriority = false;
|
||||||
vs.BindingTableEntryCount = get_binding_table_entry_count(vs_bin);
|
vs.FloatingPointMode = IEEE754;
|
||||||
|
vs.IllegalOpcodeExceptionEnable = false;
|
||||||
|
vs.AccessesUAV = false;
|
||||||
|
vs.SoftwareExceptionEnable = false;
|
||||||
|
|
||||||
vs.ThreadDispatchPriority = false;
|
vs.ScratchSpaceBasePointer = (struct anv_address) {
|
||||||
vs.FloatingPointMode = IEEE754;
|
.bo = anv_scratch_pool_alloc(device, &device->scratch_pool,
|
||||||
vs.IllegalOpcodeExceptionEnable = false;
|
MESA_SHADER_VERTEX,
|
||||||
vs.AccessesUAV = false;
|
vs_prog_data->base.base.total_scratch),
|
||||||
vs.SoftwareExceptionEnable = false;
|
.offset = 0,
|
||||||
|
};
|
||||||
|
vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base);
|
||||||
|
|
||||||
vs.ScratchSpaceBasePointer = (struct anv_address) {
|
vs.DispatchGRFStartRegisterForURBData =
|
||||||
.bo = anv_scratch_pool_alloc(device, &device->scratch_pool,
|
vs_prog_data->base.base.dispatch_grf_start_reg;
|
||||||
MESA_SHADER_VERTEX,
|
|
||||||
vs_prog_data->base.base.total_scratch),
|
|
||||||
.offset = 0,
|
|
||||||
};
|
|
||||||
vs.PerThreadScratchSpace = scratch_space(&vs_prog_data->base.base);
|
|
||||||
|
|
||||||
vs.DispatchGRFStartRegisterForURBData =
|
vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length;
|
||||||
vs_prog_data->base.base.dispatch_grf_start_reg;
|
vs.VertexURBEntryReadOffset = 0;
|
||||||
|
|
||||||
vs.VertexURBEntryReadLength = vs_prog_data->base.urb_read_length;
|
vs.MaximumNumberofThreads = devinfo->max_vs_threads - 1;
|
||||||
vs.VertexURBEntryReadOffset = 0;
|
vs.StatisticsEnable = false;
|
||||||
|
vs.SIMD8DispatchEnable =
|
||||||
|
vs_prog_data->base.dispatch_mode == DISPATCH_MODE_SIMD8;
|
||||||
|
vs.VertexCacheDisable = false;
|
||||||
|
vs.FunctionEnable = true;
|
||||||
|
|
||||||
vs.MaximumNumberofThreads = devinfo->max_vs_threads - 1;
|
vs.VertexURBEntryOutputReadOffset = offset;
|
||||||
vs.StatisticsEnable = false;
|
vs.VertexURBEntryOutputLength = length;
|
||||||
vs.SIMD8DispatchEnable =
|
|
||||||
vs_prog_data->base.dispatch_mode == DISPATCH_MODE_SIMD8;
|
|
||||||
vs.VertexCacheDisable = false;
|
|
||||||
vs.FunctionEnable = true;
|
|
||||||
|
|
||||||
vs.VertexURBEntryOutputReadOffset = offset;
|
/* TODO */
|
||||||
vs.VertexURBEntryOutputLength = length;
|
vs.UserClipDistanceClipTestEnableBitmask = 0;
|
||||||
|
vs.UserClipDistanceCullTestEnableBitmask = 0;
|
||||||
/* TODO */
|
|
||||||
vs.UserClipDistanceClipTestEnableBitmask = 0;
|
|
||||||
vs.UserClipDistanceCullTestEnableBitmask = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const int num_thread_bias = GEN_GEN == 8 ? 2 : 1;
|
const int num_thread_bias = GEN_GEN == 8 ? 2 : 1;
|
||||||
|
|
Loading…
Reference in New Issue