mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 06:20:09 +01:00
spirv: handle gl_SampleMask
SPIR-V maps both gl_SampleMask and gl_SampleMaskIn to the same builtin (SampleMask). The only way to tell which one we are dealing with is to check if it is an input or an output. Fixes: dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.write.* Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
9467d78d38
commit
56495080ed
1 changed files with 6 additions and 2 deletions
|
|
@ -975,8 +975,12 @@ vtn_get_builtin_location(struct vtn_builder *b,
|
|||
set_mode_system_value(mode);
|
||||
break;
|
||||
case SpvBuiltInSampleMask:
|
||||
*location = SYSTEM_VALUE_SAMPLE_MASK_IN; /* XXX out? */
|
||||
set_mode_system_value(mode);
|
||||
if (*mode == nir_var_shader_out) {
|
||||
*location = FRAG_RESULT_SAMPLE_MASK;
|
||||
} else {
|
||||
*location = SYSTEM_VALUE_SAMPLE_MASK_IN;
|
||||
set_mode_system_value(mode);
|
||||
}
|
||||
break;
|
||||
case SpvBuiltInFragDepth:
|
||||
*location = FRAG_RESULT_DEPTH;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue