st/mesa: add texture gather support. (v2)

Graphics / Mesa 3D Graphics Library / Mesa - Dave Airlie [redhat.com] - 24 February 2014 21:29 UTC

This adds support for GL_ARB_texture_gather, and one step of support for GL_ARB_gpu_shader5.

This adds support for passing the TG4 instruction, along with non-constant texture offsets, and tracking them for the optimisation passes.

This doesn't support native textureGatherOffsets hw, to do that you'd need to add a CAP and if set disable the lowering pass, and bump the MAX offsets to 4, then do the i0,j0 sampling using those.

7c3138a st/mesa: add texture gather support. (v2)
src/mesa/state_tracker/st_extensions.c | 3 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 117 +++++++++++++++++++++-------
2 files changed, 93 insertions(+), 27 deletions(-)

Upstream: cgit.freedesktop.org


  • Share