mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-20 22:50:36 +01:00
r600/sfn/tests: add simple copy-prop test with register source
Just to make sure the register intrinsic conversion doesn't need the helpers. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24212>
This commit is contained in:
parent
10938cddd7
commit
d8291cc7ee
1 changed files with 36 additions and 0 deletions
|
|
@ -125,6 +125,42 @@ EXPORT_DONE PIXEL 0 S2.xyzw
|
|||
check(sh, shader_expect);
|
||||
}
|
||||
|
||||
TEST_F(TestShaderFromNir, CopyPropRegDest)
|
||||
{
|
||||
const char *shader_input =
|
||||
R"(FS
|
||||
CHIPCLASS EVERGREEN
|
||||
REGISTERS R0.x
|
||||
PROP MAX_COLOR_EXPORTS:1
|
||||
PROP COLOR_EXPORTS:1
|
||||
PROP COLOR_EXPORT_MASK:15
|
||||
OUTPUT LOC:0 NAME:1 MASK:15
|
||||
SHADER
|
||||
ALU MOV S2.x : R0.x {W}
|
||||
ALU MUL S3.x : S2.x S2.x {W}
|
||||
EXPORT_DONE PIXEL 0 S3.xxxx
|
||||
)";
|
||||
|
||||
const char *shader_expect =
|
||||
R"(FS
|
||||
CHIPCLASS EVERGREEN
|
||||
REGISTERS R0.x
|
||||
PROP MAX_COLOR_EXPORTS:1
|
||||
PROP COLOR_EXPORTS:1
|
||||
PROP COLOR_EXPORT_MASK:15
|
||||
OUTPUT LOC:0 NAME:1 MASK:15
|
||||
SHADER
|
||||
ALU MUL S3.x : R0.x R0.x {W}
|
||||
EXPORT_DONE PIXEL 0 S3.xxxx
|
||||
)";
|
||||
|
||||
auto sh = from_string(shader_input);
|
||||
|
||||
optimize(*sh);
|
||||
|
||||
check(sh, shader_expect);
|
||||
}
|
||||
|
||||
TEST_F(TestShaderFromNir, OptimizeWithDestArrayValue)
|
||||
{
|
||||
auto sh = from_string(shader_with_dest_array);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue