.BlendStatePointer = pipeline->blend_state.offset);
}
-static inline uint32_t
-scratch_space(const struct brw_stage_prog_data *prog_data)
-{
- return ffs(prog_data->total_scratch / 1024);
-}
-
GENX_FUNC(GEN7, GEN75) VkResult
genX(graphics_pipeline_create)(
VkDevice _device,
.ExpectedVertexCount = pipeline->gs_vertex_count,
.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_GEOMETRY],
- .PerThreadScratchSpace = ffs(gs_prog_data->base.base.total_scratch / 2048),
+ .PerThreadScratchSpace = scratch_space(&gs_prog_data->base.base),
.OutputVertexSize = gs_prog_data->output_vertex_size_hwords * 2 - 1,
.OutputTopology = gs_prog_data->output_topology,
.SoftwareExceptionEnable = false,
.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_VERTEX],
- .PerThreadScratchSpace = ffs(vue_prog_data->base.total_scratch / 2048),
+ .PerThreadScratchSpace = scratch_space(&vue_prog_data->base),
.DispatchGRFStartRegisterForURBData =
vue_prog_data->base.dispatch_grf_start_reg,
.SamplerCount = 1,
.ScratchSpaceBasePointer = pipeline->scratch_start[MESA_SHADER_FRAGMENT],
- .PerThreadScratchSpace = ffs(wm_prog_data->base.total_scratch / 2048),
+ .PerThreadScratchSpace = scratch_space(&wm_prog_data->base),
.MaximumNumberofThreadsPerPSD = 64 - num_thread_bias,
.PositionXYOffsetSelect = wm_prog_data->uses_pos_offset ?
.DSNumberofURBEntries = 0);
}
+static inline uint32_t
+scratch_space(const struct brw_stage_prog_data *prog_data)
+{
+ return ffs(prog_data->total_scratch / 2048);
+}
+
static const uint32_t vk_to_gen_cullmode[] = {
[VK_CULL_MODE_NONE] = CULLMODE_NONE,
[VK_CULL_MODE_FRONT_BIT] = CULLMODE_FRONT,