diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp | 11 |
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; } |