OSDN Git Service

program: Make prog_to_nir create texture/sampler derefs.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 6 Feb 2019 03:02:44 +0000 (19:02 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Feb 2019 05:34:40 +0000 (21:34 -0800)
commit04bdc56872f5b3ea00a8d2c88900cb07eea846f4
tree3e5a8e50f472d8b28dd539c59471eb37329c0645
parent6a4be25a908f73d1cab8ad33bd26c3f7c9ddf7ca
program: Make prog_to_nir create texture/sampler derefs.

Until now, prog_to_nir has been setting texture_index and sampler_index
directly.  This is different than GLSL shaders, which create variable
dereferences and rely on lowering passes to reach this final form.

radeonsi uses variable dereferences for samplers rather than
texture_index and sampler_index, so it doesn't even make sense to set
them there.  By moving to derefs, we ensure that both GLSL and ARB
programs produce the same final form that the driver desires.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/program/prog_to_nir.c