-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for scalarized flat saturation
This was failing on the Mesa Turnip driver. New test: dEQP-VK.draw.renderpass.basic_draw.misc.flat_b_sat_error Components: Vulkan VK-GL-CTS issue: 5107 Change-Id: I473f8c6728c37230594f294634370e4a18eeb978
- Loading branch information
Showing
5 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
external/vulkancts/data/vulkan/amber/draw/misc/flat_b_sat_error.amber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!amber | ||
# Reproducer for https://gitlab.freedesktop.org/mesa/mesa/-/issues/10999 | ||
|
||
SHADER vertex vtex_shader GLSL | ||
#version 430 | ||
layout(location = 0) in vec2 data_in; | ||
layout(location = 0) out flat float data_out; | ||
void main() { | ||
const float count = 5.0; | ||
gl_PointSize = 1.0; | ||
gl_Position = vec4((((data_in.x + 0.5) / count) * 2.0) - 1.0, 0.0, 0.0, 1.0); | ||
data_out = data_in.y; | ||
} | ||
END | ||
|
||
SHADER fragment frag_shader GLSL | ||
#version 430 | ||
layout(location = 0) in flat float data_in; | ||
layout(location = 0) out vec4 final_color; | ||
void main() { | ||
const float epsilon = 0.0009765625; // Makes sure 0.5 is rounded up to 128. | ||
final_color = vec4(max(0.0, min(max(data_in, 0.0), 1.0) - 0.5) + epsilon, 0.0, 0.0, 1.0); | ||
} | ||
END | ||
|
||
BUFFER position_buf DATA_TYPE vec2<float> DATA | ||
0 0.0 | ||
1 0.5 | ||
2 1.0 | ||
3 1.5 | ||
4 2.0 | ||
END | ||
|
||
BUFFER framebuffer FORMAT B8G8R8A8_UNORM | ||
|
||
PIPELINE graphics pipeline | ||
ATTACH vtex_shader | ||
ATTACH frag_shader | ||
|
||
VERTEX_DATA position_buf LOCATION 0 | ||
FRAMEBUFFER_SIZE 5 1 | ||
VIEWPORT 0 0 SIZE 5 1 | ||
BIND BUFFER framebuffer AS color LOCATION 0 | ||
END | ||
|
||
RUN pipeline DRAW_ARRAY AS POINT_LIST START_IDX 0 | ||
EXPECT framebuffer IDX 0 0 SIZE 1 1 EQ_RGBA 0 0 0 255 | ||
EXPECT framebuffer IDX 1 0 SIZE 1 1 EQ_RGBA 0 0 0 255 | ||
EXPECT framebuffer IDX 2 0 SIZE 1 1 EQ_RGBA 128 0 0 255 | ||
EXPECT framebuffer IDX 3 0 SIZE 1 1 EQ_RGBA 128 0 0 255 | ||
EXPECT framebuffer IDX 4 0 SIZE 1 1 EQ_RGBA 128 0 0 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
include_directories( | ||
.. | ||
../amber | ||
${DEQP_INL_DIR} | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters