summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-10-25 11:48:24 -0400
committerRob Clark <[email protected]>2013-11-01 20:17:56 -0400
commit4ddd4e83c70d1437caea0b9c61f89aade38e993e (patch)
tree35706f1421470933096d2cc2fea58721e95ab375 /src/gallium/drivers/freedreno
parent625a6313837f001196bfb8fde8f9f0b4c291aaad (diff)
freedreno: we do actually support sqrt
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_compiler.c4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c4
2 files changed, 8 insertions, 0 deletions
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;