summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-09-30 13:25:24 -0700
committerEric Anholt <[email protected]>2014-10-08 17:42:59 +0200
commit4f6e4c7370221b0cf11d6bbc3ddb02799671c818 (patch)
tree99266c93bc403e477cb3223dc491130989a69560 /src/gallium/drivers
parentf9854e169f54c8a79c7c01733d74979d300d5dba (diff)
vc4: Start using tgsi_lowering for opcodes we haven't supported before.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 26068e283eb..52de8a88ae7 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -33,6 +33,7 @@
#include "util/ralloc.h"
#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_info.h"
+#include "tgsi/tgsi_lowering.h"
#include "vc4_context.h"
#include "vc4_qpu.h"
@@ -1730,7 +1731,20 @@ vc4_shader_state_create(struct pipe_context *pctx,
if (!so)
return NULL;
- so->tokens = tgsi_dup_tokens(cso->tokens);
+ const struct tgsi_lowering_config lowering_config = {
+ .lower_DST = true,
+ .lower_XPD = true,
+ .lower_SCS = true,
+ .lower_EXP = true,
+ .lower_LOG = true,
+ .lower_DPH = true,
+ .lower_DP2A = true,
+ };
+
+ struct tgsi_shader_info info;
+ so->tokens = tgsi_transform_lowering(&lowering_config, cso->tokens, &info);
+ if (!so->tokens)
+ so->tokens = tgsi_dup_tokens(cso->tokens);
return so;
}