aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-10-12 19:37:02 +0200
committerChristoph Bumiller <[email protected]>2011-10-21 23:00:36 +0200
commitc8ae342bf3efc2c43083ab11f0d52022cffe8ba4 (patch)
tree9ca5a16f2417df38f4ed119c35da541266fe1776
parent903e3257d071caeeec84a096069a78b55666f72d (diff)
d3d1x/sm4: save CUSTOMDATA
This is the data for the immediate constant buffer.
-rw-r--r--src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp
index 9d7392b9a2c..e35f8f2be9b 100644
--- a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp
+++ b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp
@@ -197,7 +197,18 @@ relative:
if(opcode == SM4_OPCODE_CUSTOMDATA)
{
+ // immediate constant buffer data
unsigned customlen = read32() - 2;
+
+ sm4_dcl& dcl = *new sm4_dcl;
+ program.dcls.push_back(&dcl);
+
+ dcl.opcode = SM4_OPCODE_CUSTOMDATA;
+ dcl.num = customlen;
+ dcl.data = malloc(customlen * sizeof(tokens[0]));
+
+ memcpy(dcl.data, &tokens[0], customlen * sizeof(tokens[0]));
+
skip(customlen);
continue;
}