From be78087655f4651d67b216f1b50554665cd135d1 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Mon, 31 Jan 2022 10:11:15 -0800 Subject: [PATCH] r300: Disable fp16 and int16 in swtcl vertex shaders. We already had them disabled for hwtcl, but in the swtcl case gallivm's param query would return (nir) support even though nir-to-tgsi couldn't handle it because TGSI doesn't do fp16/int16. Fixes: 7d2ea9b0edef ("r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.") Reviewed-by: Matt Turner Part-of: --- src/gallium/drivers/r300/r300_screen.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 798dfe9c139..06be9f0d78d 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -350,6 +350,15 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, case PIPE_SHADER_CAP_INTEGERS: return 0; + /* Even if gallivm NIR can do this, we call nir_to_tgsi manually and + * TGSI can't. + */ + case PIPE_SHADER_CAP_INT16: + case PIPE_SHADER_CAP_FP16: + case PIPE_SHADER_CAP_FP16_DERIVATIVES: + case PIPE_SHADER_CAP_FP16_CONST_BUFFERS: + return 0; + /* While draw could normally handle this for the VS, the NIR lowering * to regs can't handle our non-native-integers, so we have to lower to * if ladders.