Mesa (main): tu: handle half-reg fs outputs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 26 16:41:26 UTC 2021
Module: Mesa
Branch: main
Commit: b45cddda183230232937387f91d009500b2372c9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b45cddda183230232937387f91d009500b2372c9
Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date: Mon Jul 26 18:09:12 2021 +0300
tu: handle half-reg fs outputs
This would allow to enable translation of RelaxedPrecision spirv
variable decorator into mediump which for us means fp16.
Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12067>
---
src/freedreno/vulkan/tu_pipeline.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c
index a7b495a04f6..dc9c8fc52df 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -1439,10 +1439,9 @@ tu6_emit_fs_outputs(struct tu_cs *cs,
tu_cs_emit_pkt4(cs, REG_A6XX_SP_FS_OUTPUT_REG(0), 8);
for (uint32_t i = 0; i < ARRAY_SIZE(fragdata_regid); i++) {
- // TODO we could have a mix of half and full precision outputs,
- // we really need to figure out half-precision from IR3_REG_HALF
tu_cs_emit(cs, A6XX_SP_FS_OUTPUT_REG_REGID(fragdata_regid[i]) |
- (false ? A6XX_SP_FS_OUTPUT_REG_HALF_PRECISION : 0));
+ (COND(fragdata_regid[i] & HALF_REG_ID,
+ A6XX_SP_FS_OUTPUT_REG_HALF_PRECISION)));
if (VALIDREG(fragdata_regid[i])) {
fs_render_components |= 0xf << (i * 4);
More information about the mesa-commit
mailing list