mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/glsl: Handle SV_SAMPLE_INDEX inputs.
This commit is contained in:
parent
3dbaf11f8c
commit
ca42adbf6b
Notes:
Henri Verbeet
2024-11-06 23:02:41 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1232
@ -1306,7 +1306,13 @@ static void shader_glsl_print_sysval_name(struct vkd3d_string_buffer *buffer, st
|
||||
"Internal compiler error: Unhandled SV_IS_FRONT_FACE in shader type #%x.", version->type);
|
||||
vkd3d_string_buffer_printf(buffer,
|
||||
"uintBitsToFloat(uvec4(gl_FrontFacing ? 0xffffffffu : 0u, 0u, 0u, 0u))");
|
||||
break;
|
||||
|
||||
case VKD3D_SHADER_SV_SAMPLE_INDEX:
|
||||
if (version->type != VKD3D_SHADER_TYPE_PIXEL)
|
||||
vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
|
||||
"Internal compiler error: Unhandled SV_SAMPLE_INDEX in shader type #%x.", version->type);
|
||||
vkd3d_string_buffer_printf(buffer, "intBitsToFloat(ivec4(gl_SampleID, 0, 0, 0))");
|
||||
break;
|
||||
|
||||
case VKD3D_SHADER_SV_TARGET:
|
||||
|
@ -167,7 +167,7 @@ float4 main(uint id : sv_sampleindex) : sv_target
|
||||
|
||||
[test]
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
todo(glsl | sm>=6 | msl) draw quad
|
||||
todo(sm>=6 | msl) draw quad
|
||||
probe (32, 32) rgba(3.75, 0.25, 0.5, 1.0)
|
||||
todo(msl) copy rtv 0 srv 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user