From: Christoph Bumiller Date: Wed, 12 Oct 2011 17:37:02 +0000 (+0200) Subject: d3d1x/sm4: save CUSTOMDATA X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8ae342bf3efc2c43083ab11f0d52022cffe8ba4;p=mesa.git d3d1x/sm4: save CUSTOMDATA This is the data for the immediate constant buffer. --- 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; }