diff --git a/tests/hlsl/geometry.shader_test b/tests/hlsl/geometry.shader_test index f49181046..f09ed708f 100644 --- a/tests/hlsl/geometry.shader_test +++ b/tests/hlsl/geometry.shader_test @@ -60,9 +60,53 @@ float4 main(struct ps_data ps_input) : SV_Target } [test] +clear rtv 0 0.0 0.0 0.0 0.0 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 (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 (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) + +[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 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) diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 6811d4493..da063ea6c 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -160,6 +160,7 @@ static bool check_qualifier_args_conjunction(struct shader_runner *runner, "mvk", "opengl", "vulkan", + "warp", }; bool holds = true; diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 69777d4bc..19444fe16 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -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.tag_count = 0; + if (test_options.use_warp_device) + runner->caps.tags[runner->caps.tag_count++] = "warp"; + rt_width = RENDER_TARGET_WIDTH; rt_height = RENDER_TARGET_HEIGHT; SetRect(&rect, 0, 0, rt_width, rt_height); diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index 06e03d699..06ea4ddbe 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -1119,6 +1119,8 @@ static void d3d12_runner_init_caps(struct d3d12_shader_runner *runner, runner->caps.tags[runner->caps.tag_count++] = "llvmpipe"; if (is_mesa_device_lt(device, 23, 3, 0)) 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)