mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 18:50:10 +01:00
turnip: set shader key msaa field
Fixes per-sample interpolation. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4665>
This commit is contained in:
parent
36e0d2f39b
commit
83b2f1d8cf
1 changed files with 6 additions and 0 deletions
|
|
@ -596,6 +596,7 @@ tu_shader_compile_options_init(
|
|||
const VkGraphicsPipelineCreateInfo *pipeline_info)
|
||||
{
|
||||
bool has_gs = false;
|
||||
bool msaa = false;
|
||||
if (pipeline_info) {
|
||||
for (uint32_t i = 0; i < pipeline_info->stageCount; i++) {
|
||||
if (pipeline_info->pStages[i].stage == VK_SHADER_STAGE_GEOMETRY_BIT) {
|
||||
|
|
@ -603,12 +604,17 @@ tu_shader_compile_options_init(
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pipeline_info->pRasterizationState->rasterizerDiscardEnable &&
|
||||
pipeline_info->pMultisampleState->rasterizationSamples > 1)
|
||||
msaa = true;
|
||||
}
|
||||
|
||||
*options = (struct tu_shader_compile_options) {
|
||||
/* TODO: Populate the remaining fields of ir3_shader_key. */
|
||||
.key = {
|
||||
.has_gs = has_gs,
|
||||
.msaa = msaa,
|
||||
},
|
||||
/* TODO: VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT
|
||||
* some optimizations need to happen otherwise shader might not compile
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue