mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Allow interpolation modifiers on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
de860c3cbf
commit
1930b51d97
Notes:
Alexandre Julliard
2023-10-09 23:10:36 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/358
@ -361,6 +361,9 @@ struct hlsl_attribute
|
||||
HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \
|
||||
HLSL_MODIFIER_COLUMN_MAJOR)
|
||||
|
||||
#define HLSL_INTERPOLATION_MODIFIERS_MASK (HLSL_STORAGE_NOINTERPOLATION | HLSL_STORAGE_CENTROID | \
|
||||
HLSL_STORAGE_NOPERSPECTIVE)
|
||||
|
||||
#define HLSL_MODIFIERS_MAJORITY_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)
|
||||
|
||||
#define HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT 0
|
||||
|
@ -5051,7 +5051,7 @@ field:
|
||||
|
||||
if (!(type = apply_type_modifiers(ctx, $2, &modifiers, true, &@1)))
|
||||
YYABORT;
|
||||
if (modifiers & ~HLSL_STORAGE_NOINTERPOLATION)
|
||||
if (modifiers & ~HLSL_INTERPOLATION_MODIFIERS_MASK)
|
||||
{
|
||||
struct vkd3d_string_buffer *string;
|
||||
|
||||
|
@ -119,7 +119,7 @@ void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_posit
|
||||
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
||||
}
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
struct ps_input
|
||||
{
|
||||
centroid float4 t : texcoord;
|
||||
@ -131,10 +131,10 @@ float4 main(nointerpolation ps_input input) : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw triangle list 3
|
||||
todo probe all rgba (0.0, 1.0, 0.0, 1.0)
|
||||
draw triangle list 3
|
||||
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
||||
|
||||
[vertex shader fail]
|
||||
[vertex shader fail todo]
|
||||
struct ps_input
|
||||
{
|
||||
nointerpolation centroid float4 t : texcoord;
|
||||
|
Loading…
Reference in New Issue
Block a user