diff options
author | Rob Clark <robclark@freedesktop.org> | 2015-06-10 19:51:32 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2015-06-21 07:52:02 -0400 |
commit | f481af110e6ab42b2d184f225bfe7eb1e66df393 (patch) | |
tree | 898057d3dc5104a87398b8607ef1c5f46c17418c /src/gallium/auxiliary/tgsi/tgsi_transform.h | |
parent | b13135e06671468d296a33abf4150060f2b2a061 (diff) | |
download | external_mesa3d-f481af110e6ab42b2d184f225bfe7eb1e66df393.zip external_mesa3d-f481af110e6ab42b2d184f225bfe7eb1e66df393.tar.gz external_mesa3d-f481af110e6ab42b2d184f225bfe7eb1e66df393.tar.bz2 |
tgsi/transform: add support for SVIEW decls
TODO single return_type (use enum)
v2: single return_type arg, and use enum
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_transform.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_transform.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 921aa90..39d7688 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h @@ -143,6 +143,27 @@ tgsi_transform_sampler_decl(struct tgsi_transform_context *ctx, ctx->emit_declaration(ctx, &decl); } +static INLINE void +tgsi_transform_sampler_view_decl(struct tgsi_transform_context *ctx, + unsigned index, + unsigned target, + enum tgsi_return_type type) +{ + struct tgsi_full_declaration decl; + + decl = tgsi_default_full_declaration(); + decl.Declaration.File = TGSI_FILE_SAMPLER_VIEW; + decl.Declaration.UsageMask = 0xf; + decl.Range.First = + decl.Range.Last = index; + decl.SamplerView.Resource = target; + decl.SamplerView.ReturnTypeX = type; + decl.SamplerView.ReturnTypeY = type; + decl.SamplerView.ReturnTypeZ = type; + decl.SamplerView.ReturnTypeW = type; + + ctx->emit_declaration(ctx, &decl); +} static INLINE void tgsi_transform_immediate_decl(struct tgsi_transform_context *ctx, |