[Mesa-dev] [PATCH 1/2] gallium: add texture gather support to gallium
Ilia Mirkin
imirkin at alum.mit.edu
Thu Feb 6 17:56:38 PST 2014
On Thu, Feb 6, 2014 at 8:52 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This just adds the TG4 opcode, and a CAP for the
> max texture gather components.
Is this different from GATHER4? If it is, should probably be
documented in docs/source/tgsi.rst...
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/gallium/auxiliary/tgsi/tgsi_info.c | 1 +
> src/gallium/include/pipe/p_defines.h | 3 ++-
> src/gallium/include/pipe/p_shader_tokens.h | 4 +++-
> 3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
> index f993600..0fa1338 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_info.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
> @@ -221,6 +221,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
> { 1, 3, 1, 0, 0, 0, OTHR, "TXL2", TGSI_OPCODE_TXL2 },
> { 1, 2, 0, 0, 0, 0, COMP, "IMUL_HI", TGSI_OPCODE_IMUL_HI },
> { 1, 2, 0, 0, 0, 0, COMP, "UMUL_HI", TGSI_OPCODE_UMUL_HI },
> + { 1, 2, 1, 0, 0, 0, OTHR, "TG4", TGSI_OPCODE_TG4 },
> };
>
> const struct tgsi_opcode_info *
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index dbedd87..316aa8b 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -520,7 +520,8 @@ enum pipe_cap {
> PIPE_CAP_MAX_VIEWPORTS = 84,
> PIPE_CAP_ENDIANNESS = 85,
> PIPE_CAP_MIXED_FRAMEBUFFER_SIZES = 86,
> - PIPE_CAP_TGSI_VS_LAYER = 87
> + PIPE_CAP_TGSI_VS_LAYER = 87,
> + PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS = 88
> };
>
> #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 8750bd2..8fa6a0a 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] */
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list