diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 93910f90741..1117b55faa1 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -1803,7 +1803,13 @@ DECL_SPECIAL(LOOP) DECL_SPECIAL(RET) { - ureg_RET(tx->ureg); + /* RET as a last instruction could be safely ignored. + * Remove it to prevent crashes/warnings in case underlying + * driver doesn't implement arbitrary returns. + */ + if (*(tx->parse_next) != NINED3DSP_END) { + ureg_RET(tx->ureg); + } return D3D_OK; } |