From: Rob Clark Date: Wed, 10 Jun 2015 23:51:32 +0000 (-0400) Subject: tgsi/transform: add support for SVIEW decls X-Git-Tag: upstream/17.1.0~18159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f481af110e6ab42b2d184f225bfe7eb1e66df393;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Roland Scheidegger Reviewed-by: Jose Fonseca --- 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,