st/nine: Ignore D3DSIO_RET if it is the last instruction in a shader
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Tue, 24 Sep 2019 11:12:39 +0000 (14:12 +0300)
committerDanylo Piliaiev <danylo.piliaiev@gmail.com>
Wed, 25 Sep 2019 18:24:01 +0000 (18:24 +0000)
commit2d8f77db839cb3a83f0b1575a028d5aa4258c322
tree50f0b9b63b8348dae84b541d268f7cf36a902bfd
parent60861388e7a0dff46cd4c23cebd80164412fef51
st/nine: Ignore D3DSIO_RET if it is the last instruction in a shader

RET as a last instruction could be safely ignored.
Remove it to prevent crashes/warnings in case underlying driver
doesn't implement arbitrary returns.

A better way would be to remove the RET after the whole shader
is parsed which will handle a possible case when the last RET is
followed by a comment.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/nine_shader.c