freedreno: we do actually support sqrt
authorRob Clark <robclark@freedesktop.org>
Fri, 25 Oct 2013 15:48:24 +0000 (11:48 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 2 Nov 2013 00:17:56 +0000 (20:17 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a2xx/fd2_compiler.c
src/gallium/drivers/freedreno/freedreno_screen.c

index 4d0dc323a68585696a0ce43fc66e93a3236de74d..e4acc7e95b48815bd785a8f138656d4a2f755df1 100644 (file)
@@ -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);
index 875b506fb10d9df206d9b02ab97a7af6f5160bd7..b6d37e7e43880ad3c00218207931f6018dbd0105 100644 (file)
@@ -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;