diff options
author | Dave Airlie <[email protected]> | 2014-02-07 11:37:31 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2014-02-25 13:29:37 +1000 |
commit | 7c3138acb9de06148c0162384e49cc093148a1d6 (patch) | |
tree | be4a5bddfab1f726be6b8d9339ada173a9636358 /src/mesa/state_tracker/st_extensions.c | |
parent | 2fcbec48d78af2cd03138feb83e63e439a4b6a60 (diff) |
st/mesa: add texture gather support. (v2)
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.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index e43e7b44ec5..47b975b5bf0 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -268,6 +268,7 @@ void st_init_limits(struct st_context *st) c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET); c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET); + c->MaxProgramTextureGatherComponents = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS); c->UniformBooleanTrue = ~0; c->MaxTransformFeedbackBuffers = @@ -787,4 +788,6 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.ARB_viewport_array = GL_TRUE; } } + if (ctx->Const.MaxProgramTextureGatherComponents > 0) + ctx->Extensions.ARB_texture_gather = GL_TRUE; } |