diff options
author | Axel Davy <[email protected]> | 2016-11-18 18:44:43 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:21 +0100 |
commit | 2cd8622fb33b72671feae3918850e7cc885aa030 (patch) | |
tree | e56c426632a866611db8770834c91fb2a6256b90 /src | |
parent | 461e03167e20451ee2f531120f93894b23d802da (diff) |
st/nine: Do not generate gallium NOP on d3d NOP
Some drivers crash if NOP is generated.
Besides there is no point to generate NOP.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index ab21dafc124..b9597786b90 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -1573,6 +1573,13 @@ d3dsio_to_string( unsigned opcode ) static HRESULT NineTranslateInstruction_Generic(struct shader_translator *); +DECL_SPECIAL(NOP) +{ + /* Nothing to do. NOP was used to avoid hangs + * with very old d3d drivers. */ + return D3D_OK; +} + DECL_SPECIAL(M4x4) { return NineTranslateInstruction_Mkxn(tx, 4, 4); @@ -2863,7 +2870,7 @@ DECL_SPECIAL(COMMENT) struct sm1_op_info inst_table[] = { - _OPI(NOP, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, NULL), /* 0 */ + _OPI(NOP, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, SPECIAL(NOP)), /* 0 */ _OPI(MOV, MOV, V(0,0), V(3,0), V(0,0), V(3,0), 1, 1, NULL), _OPI(ADD, ADD, V(0,0), V(3,0), V(0,0), V(3,0), 1, 2, NULL), /* 2 */ _OPI(SUB, SUB, V(0,0), V(3,0), V(0,0), V(3,0), 1, 2, NULL), /* 3 */ |