mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
vk/compiler: Handle interpolation qualifiers for SPIR-V shaders
This commit is contained in:
parent
126ade0023
commit
362ab2d788
1 changed files with 10 additions and 0 deletions
|
|
@ -946,6 +946,16 @@ setup_nir_io(struct gl_shader *mesa_shader,
|
|||
struct gl_program *prog = mesa_shader->Program;
|
||||
foreach_list_typed(nir_variable, var, node, &shader->inputs) {
|
||||
prog->InputsRead |= BITFIELD64_BIT(var->data.location);
|
||||
if (shader->stage == MESA_SHADER_FRAGMENT) {
|
||||
struct gl_fragment_program *fprog = (struct gl_fragment_program *)prog;
|
||||
|
||||
fprog->InterpQualifier[var->data.location] =
|
||||
(glsl_interp_qualifier)var->data.interpolation;
|
||||
if (var->data.centroid)
|
||||
fprog->IsCentroid |= BITFIELD64_BIT(var->data.location);
|
||||
if (var->data.sample)
|
||||
fprog->IsSample |= BITFIELD64_BIT(var->data.location);
|
||||
}
|
||||
}
|
||||
|
||||
foreach_list_typed(nir_variable, var, node, &shader->outputs) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue