st/nine: Correctly handle when ff vs should have no texture coord input/output

Graphics / Mesa 3D Graphics Library / Mesa - Axel Davy [ens.fr] - 22 January 2015 16:16 UTC

Previous code semantic was:

. if ff ps will not run a ff stage, then do not output texture coords for this stage for vs . if XYZRHW is used (position_t), use only the mode where input coordinates are copied to the outputs.

Problem is when apps don't give texture inputs. When apps precise PASSTHRU, it means copy texture coord input to texture coord output if there is such input. The case where there is no texture coord input wasn't handled correctly.

Drivers like r300 dislike when vs has inputs that are not fed.

Moreover if the app uses ff vs with a programmable ps, we shouldn't look at what are the parameters of the ff ps to decide to output or not texture coordinates.

The new code semantic is:

. if XYZRHW is used, restrict to PASSTHRU . if PASSTHRU is used and no texture input is declared, then do not output texture coords for this stage

The case where ff ps needs a texture coord input and ff vs doesn't output it is not handled, and should probably be a runtime error.

This fixes 3Dmark05, which uses ff vs with programmable ps.

8751734 st/nine: Correctly handle when ff vs should have no texture coord input/output
src/gallium/state_trackers/nine/nine_ff.c | 31 +++++++++++++++++++----------
1 file changed, 20 insertions(+), 11 deletions(-)

Upstream: cgit.freedesktop.org


  • Share