mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
graphics: accept AGC vertex-buffer-only shaders
This commit is contained in:
@@ -57,6 +57,22 @@ void TestValidAndInvalidMetadata() {
|
||||
output.input_semantics_count == 1,
|
||||
"valid AGC vertex metadata was decoded incorrectly");
|
||||
|
||||
Fixture buffer_only;
|
||||
buffer_only.offsets[static_cast<size_t>(AgcDirectResourceType::PtrVertexAttribDescTable)] =
|
||||
AGC_ILLEGAL_DIRECT_OFFSET;
|
||||
buffer_only.mapped.input_semantics = nullptr;
|
||||
buffer_only.mapped.num_input_semantics = 0;
|
||||
Check(ShaderReadVertexMetadata(buffer_only.mapped, 64, output, &error),
|
||||
"vertex-buffer-only AGC metadata was rejected");
|
||||
Check(output.vertex_buffer_reg == 2 && output.vertex_attrib_reg == -1 &&
|
||||
output.input_semantics_count == 0,
|
||||
"vertex-buffer-only AGC metadata was decoded incorrectly");
|
||||
|
||||
Fixture attrib_only;
|
||||
attrib_only.offsets[static_cast<size_t>(AgcDirectResourceType::PtrVertexBufferTable)] =
|
||||
AGC_ILLEGAL_DIRECT_OFFSET;
|
||||
CheckRejected(attrib_only.mapped, "vertex-attribute-only AGC metadata was accepted");
|
||||
|
||||
auto missing_header = fixture.mapped;
|
||||
missing_header.user_data = nullptr;
|
||||
CheckRejected(missing_header, "missing AGC user-data header was accepted");
|
||||
@@ -79,6 +95,12 @@ void TestValidAndInvalidMetadata() {
|
||||
63;
|
||||
CheckRejected(excessive_register.mapped, "out-of-domain vertex table SGPR was accepted");
|
||||
|
||||
Fixture excessive_attrib_register;
|
||||
excessive_attrib_register
|
||||
.offsets[static_cast<size_t>(AgcDirectResourceType::PtrVertexAttribDescTable)] = 63;
|
||||
CheckRejected(excessive_attrib_register.mapped,
|
||||
"out-of-domain vertex attribute table SGPR was accepted");
|
||||
|
||||
Fixture missing_semantics;
|
||||
missing_semantics.mapped.input_semantics = nullptr;
|
||||
CheckRejected(missing_semantics.mapped, "missing vertex semantic array was accepted");
|
||||
|
||||
Reference in New Issue
Block a user