From 4ddd4e83c70d1437caea0b9c61f89aade38e993e Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 25 Oct 2013 11:48:24 -0400 Subject: [PATCH] freedreno: we do actually support sqrt Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 4 ++++ src/gallium/drivers/freedreno/freedreno_screen.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c b/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c index 4d0dc323a68..e4acc7e95b4 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c @@ -1042,6 +1042,10 @@ translate_instruction(struct fd2_compile_context *ctx, instr = ir2_instr_create_alu(cf, ~0, RECIPSQ_IEEE); add_regs_scalar_1(ctx, inst, instr); break; + case TGSI_OPCODE_SQRT: + instr = ir2_instr_create_alu(cf, ~0, SQRT_IEEE); + add_regs_scalar_1(ctx, inst, instr); + break; case TGSI_OPCODE_MUL: instr = ir2_instr_create_alu(cf, MULv, ~0); add_regs_vector_2(ctx, inst, instr); diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 875b506fb10..b6d37e7e438 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -315,7 +315,11 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_SUBROUTINES: return 0; case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED: + return 1; case PIPE_SHADER_CAP_INTEGERS: + /* we should be able to support this on a3xx, but not + * implemented yet: + */ return 0; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: return 16; -- 2.30.2