From 0f25d5e3f49a7108aa8e86a5f5b76597f352637a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sat, 14 Jun 2025 07:14:04 +0200 Subject: [PATCH] etnaviv: isa: Add texldgpcf instruction Implement support for the texldgpcf instruction, which handles texture gradient sampling with shadow comparison. Blob generates such txf's for dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*shadow* Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/etnaviv/isa/etnaviv.xml | 5 +++++ src/etnaviv/isa/tests/disasm.cpp | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/etnaviv/isa/etnaviv.xml b/src/etnaviv/isa/etnaviv.xml index 42f551238bf..b55340ba910 100644 --- a/src/etnaviv/isa/etnaviv.xml +++ b/src/etnaviv/isa/etnaviv.xml @@ -1491,6 +1491,11 @@ SPDX-License-Identifier: MIT 1 + + 110000 + 1 + + 110010 1 diff --git a/src/etnaviv/isa/tests/disasm.cpp b/src/etnaviv/isa/tests/disasm.cpp index 3d4ebec8a49..eb11fb70a9b 100644 --- a/src/etnaviv/isa/tests/disasm.cpp +++ b/src/etnaviv/isa/tests/disasm.cpp @@ -352,6 +352,17 @@ INSTANTIATE_TEST_SUITE_P(texldlpcf, DisasmTest, ); // clang-format on +// clang-format off +INSTANTIATE_TEST_SUITE_P(texldgpcf, DisasmTest, + testing::Values( + // taken from dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2dshadow_fragment (GC7000) + disasm_state{ {0x04011809, 0x00000004, 0x00000000, 0x003fc018}, "mov.sat t1.___w, void, void, t1.wwww\n"}, + disasm_state{ {0x00811030, 0x39001800, 0x01490140, 0x00290038}, "texldgpcf t1.x___, tex0.xxxx, t1.xyzw, t2.xyzz, t3.xyzz\n"}, + disasm_state{ {0x07011009, 0x00000004, 0x00000000, 0x20390018}, "mov t1._yzw, void, void, u1.xyzw\n"} + ) +); +// clang-format on + // clang-format off INSTANTIATE_TEST_SUITE_P(LoadStoreVariants, DisasmTest, testing::Values(