mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Test SV_GSInstanceID.
This commit is contained in:
committed by
Henri Verbeet
parent
52b9ef0426
commit
3797c922a5
Notes:
Henri Verbeet
2025-07-29 13:34:53 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1654
@@ -60,9 +60,53 @@ float4 main(struct ps_data ps_input) : SV_Target
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
|
clear rtv 0 0.0 0.0 0.0 0.0
|
||||||
todo(glsl) draw point list 1
|
todo(glsl) draw point list 1
|
||||||
bug(mvk) probe rtv 0 (320, 190) rgba(0.0, 0.0, 0.0, 0.0)
|
bug(mvk) probe rtv 0 (320, 190) rgba(0.0, 0.0, 0.0, 0.0)
|
||||||
bug(mvk) probe rtv 0 (255, 240) rgba(0.0, 0.0, 0.0, 0.0)
|
bug(mvk) probe rtv 0 (255, 240) rgba(0.0, 0.0, 0.0, 0.0)
|
||||||
bug(mvk) probe rtv 0 (320, 240) rgba(0.0, 1.0, 1.0, 1.0)
|
bug(mvk) probe rtv 0 (320, 240) rgba(0.0, 1.0, 1.0, 1.0)
|
||||||
bug(mvk) probe rtv 0 (385, 240) rgba(0.0, 0.0, 0.0, 0.0)
|
bug(mvk) probe rtv 0 (385, 240) rgba(0.0, 0.0, 0.0, 0.0)
|
||||||
bug(mvk) probe rtv 0 (320, 290) rgba(0.0, 0.0, 0.0, 0.0)
|
bug(mvk) probe rtv 0 (320, 290) rgba(0.0, 0.0, 0.0, 0.0)
|
||||||
|
|
||||||
|
[require]
|
||||||
|
shader model >= 5.0
|
||||||
|
geometry-shader
|
||||||
|
|
||||||
|
[geometry shader]
|
||||||
|
struct gs_data
|
||||||
|
{
|
||||||
|
float4 pos : SV_POSITION;
|
||||||
|
float4 color : COLOR;
|
||||||
|
};
|
||||||
|
|
||||||
|
[maxvertexcount(4)][instance(5)]
|
||||||
|
void main(point struct gs_data vin[1], inout TriangleStream<gs_data> vout,
|
||||||
|
uint inst_id : SV_GSInstanceID)
|
||||||
|
{
|
||||||
|
float offset = 0.2 * vin[0].pos.w;
|
||||||
|
gs_data v;
|
||||||
|
|
||||||
|
if (inst_id != 3)
|
||||||
|
return;
|
||||||
|
|
||||||
|
v.color = vin[0].color;
|
||||||
|
|
||||||
|
v.pos = float4(vin[0].pos.x - offset, vin[0].pos.y - offset, vin[0].pos.z, 1.0);
|
||||||
|
vout.Append(v);
|
||||||
|
v.pos = float4(vin[0].pos.x - offset, vin[0].pos.y + offset, vin[0].pos.z, 1.0);
|
||||||
|
vout.Append(v);
|
||||||
|
v.pos = float4(vin[0].pos.x + offset, vin[0].pos.y - offset, vin[0].pos.z, 1.0);
|
||||||
|
vout.Append(v);
|
||||||
|
v.pos = float4(vin[0].pos.x + offset, vin[0].pos.y + offset, vin[0].pos.z, 1.0);
|
||||||
|
vout.Append(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
clear rtv 0 0.0 0.0 0.0 0.0
|
||||||
|
todo(glsl | sm>=6) draw point list 1
|
||||||
|
probe rtv 0 (320, 190) f32(0.0, 0.0, 0.0, 0.0)
|
||||||
|
probe rtv 0 (255, 240) f32(0.0, 0.0, 0.0, 0.0)
|
||||||
|
% Broken on WARP with SM < 6
|
||||||
|
if(!warp | sm>=6) todo probe rtv 0 (320, 240) f32(0.0, 1.0, 1.0, 1.0)
|
||||||
|
probe rtv 0 (385, 240) f32(0.0, 0.0, 0.0, 0.0)
|
||||||
|
probe rtv 0 (320, 290) f32(0.0, 0.0, 0.0, 0.0)
|
||||||
|
@@ -160,6 +160,7 @@ static bool check_qualifier_args_conjunction(struct shader_runner *runner,
|
|||||||
"mvk",
|
"mvk",
|
||||||
"opengl",
|
"opengl",
|
||||||
"vulkan",
|
"vulkan",
|
||||||
|
"warp",
|
||||||
};
|
};
|
||||||
bool holds = true;
|
bool holds = true;
|
||||||
|
|
||||||
|
@@ -325,6 +325,10 @@ static BOOL init_test_context(struct d3d11_shader_runner *runner)
|
|||||||
runner->caps.format_caps[formats[i]] = get_format_support(runner->device, formats[i]);
|
runner->caps.format_caps[formats[i]] = get_format_support(runner->device, formats[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runner->caps.tag_count = 0;
|
||||||
|
if (test_options.use_warp_device)
|
||||||
|
runner->caps.tags[runner->caps.tag_count++] = "warp";
|
||||||
|
|
||||||
rt_width = RENDER_TARGET_WIDTH;
|
rt_width = RENDER_TARGET_WIDTH;
|
||||||
rt_height = RENDER_TARGET_HEIGHT;
|
rt_height = RENDER_TARGET_HEIGHT;
|
||||||
SetRect(&rect, 0, 0, rt_width, rt_height);
|
SetRect(&rect, 0, 0, rt_width, rt_height);
|
||||||
|
@@ -1119,6 +1119,8 @@ static void d3d12_runner_init_caps(struct d3d12_shader_runner *runner,
|
|||||||
runner->caps.tags[runner->caps.tag_count++] = "llvmpipe";
|
runner->caps.tags[runner->caps.tag_count++] = "llvmpipe";
|
||||||
if (is_mesa_device_lt(device, 23, 3, 0))
|
if (is_mesa_device_lt(device, 23, 3, 0))
|
||||||
runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3";
|
runner->caps.tags[runner->caps.tag_count++] = "mesa<23.3";
|
||||||
|
if (test_options.use_warp_device)
|
||||||
|
runner->caps.tags[runner->caps.tag_count++] = "warp";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ARRAY_SIZE(formats); ++i)
|
for (unsigned int i = 0; i < ARRAY_SIZE(formats); ++i)
|
||||||
|
Reference in New Issue
Block a user