From c8ae342bf3efc2c43083ab11f0d52022cffe8ba4 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Wed, 12 Oct 2011 19:37:02 +0200 Subject: [PATCH] d3d1x/sm4: save CUSTOMDATA This is the data for the immediate constant buffer. --- .../d3d1x/d3d1xshader/src/sm4_parse.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; } -- 2.30.2