diff options
author | Rob Clark <[email protected]> | 2015-09-18 10:44:27 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-09-18 21:07:49 -0400 |
commit | 3745c38425b3e1da5c94a5f900eb5fdc44da9439 (patch) | |
tree | 65c54abf5346216f4e5ab90a13bb3fa9a91f1bdd /src/glsl/ast_function.cpp | |
parent | 1ce8060c25c7f2c7a54159fab6a6974c0ba182a8 (diff) |
nir/lower_tex: add support to clamp texture coords
Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the
shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in
the case of projected coords, the clamping needs to happen *after*
projection.
v2: comments/suggestions from Ilia and Eric, use txs to get texture size
and clamp RECT textures to their dimensions rather than [0.0, 1.0] to
avoid having to lower RECT textures to 2D.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ast_function.cpp')
0 files changed, 0 insertions, 0 deletions