diff options
author | Luca Barbieri <[email protected]> | 2010-09-23 18:24:34 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-09-24 09:15:49 +0200 |
commit | 0e40b41ceec15d97507fe85343daad54aa1c4824 (patch) | |
tree | b859172757cfb0b6ef4fbb3655f7b5f696ce6134 | |
parent | 4babdc78448f92b8d027a66cd506351a16aef4ec (diff) |
d3d1x: don't assert on unsupported resource types
-rw-r--r-- | src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp b/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp index 7d03cecafc0..66b686687cf 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp +++ b/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp @@ -720,14 +720,18 @@ next:; break; case SM4_OPCODE_DCL_INPUT: check(idx >= 0); - if(inputs.size() <= (unsigned)idx) - inputs.resize(idx + 1); if(processor == TGSI_PROCESSOR_VERTEX) + { + if(inputs.size() <= (unsigned)idx) + inputs.resize(idx + 1); inputs[idx] = ureg_DECL_vs_input(ureg, idx); + } else if(processor == TGSI_PROCESSOR_GEOMETRY) { // TODO: is this correct? unsigned gsidx = dcl.op->indices[1].disp; + if(inputs.size() <= (unsigned)gsidx) + inputs.resize(gsidx + 1); inputs[gsidx] = ureg_DECL_gs_input(ureg, gsidx, TGSI_SEMANTIC_GENERIC, gsidx); } else @@ -789,7 +793,11 @@ next:; targets[idx].second = 0; break; default: - check(0); + // HACK to make SimpleSample10 work + //check(0); + targets[idx].first = TGSI_TEXTURE_2D; + targets[idx].second = TGSI_TEXTURE_SHADOW2D; + break; } break; case SM4_OPCODE_DCL_SAMPLER: |