diff options
author | Dave Airlie <airlied@redhat.com> | 2013-09-21 18:45:43 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-02-25 13:29:17 +1000 |
commit | 2fcbec48d78af2cd03138feb83e63e439a4b6a60 (patch) | |
tree | 3d6a39c65d50b4aa5953fae347838d2294e3e71d /src/gallium/include/pipe | |
parent | 122c3b9486d3dbf8cb6b796c9a25f43817f006d3 (diff) |
gallium: add texture gather support to gallium (v3)
This adds support to gallium for a TG4 instruction,
and two CAPs. The first CAP is required for GL_ARB_texture_gather.
The second CAP is required to expose GL_ARB_gpu_shader5.
However so far we haven't found any hardware that natively
exposes the textureGatherOffsets feature from GL, so just
lower it for now. If hardware appears for this we can add
another CAP to allow TG4 to take 4 offsets.
v2: add component selection src and a cap to say
hw can do it. (st can use to help control
GL_ARB_gpu_shader5/GLSL 4.00). Add docs.
v3: rename to SM5, add docs.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 4 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 83815cdf2da..764c2484f87 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -522,7 +522,9 @@ enum pipe_cap { PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86, PIPE_CAP_TGSI_VS_LAYER = 87, PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES = 88, - PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 89 + PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 89, + PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS = 90, + PIPE_CAP_TEXTURE_GATHER_SM5 = 91 }; #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0) diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 8750bd2da2e..8fa6a0afaeb 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -453,7 +453,9 @@ struct tgsi_property_data { #define TGSI_OPCODE_IMUL_HI 180 #define TGSI_OPCODE_UMUL_HI 181 -#define TGSI_OPCODE_LAST 182 +#define TGSI_OPCODE_TG4 182 + +#define TGSI_OPCODE_LAST 183 #define TGSI_SAT_NONE 0 /* do not saturate */ #define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */ |