[virglrenderer-devel] [PATCH] shader: enable ints if an integer sampler view is seen.

Gurchetan Singh gurchetansingh at chromium.org
Thu Jun 14 16:13:40 UTC 2018


Reviewed-by: Gurchetan Singh <gurchetansingh at chromium.org>


On Wed, Jun 13, 2018 at 9:36 PM Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> This fixes a broken shader compile with:
> KHR-GL43.texture_swizzle.smoke
> ---
>  src/vrend_shader.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/vrend_shader.c b/src/vrend_shader.c
> index 974e891..96dc40e 100644
> --- a/src/vrend_shader.c
> +++ b/src/vrend_shader.c
> @@ -1065,6 +1065,9 @@ iter_declaration(struct tgsi_iterate_context *iter,
>           return FALSE;
>        }
>        ctx->samplers[decl->Range.First].tgsi_sampler_return =
> decl->SamplerView.ReturnTypeX;
> +      if (decl->SamplerView.ReturnTypeX == TGSI_RETURN_TYPE_SINT ||
> +          decl->SamplerView.ReturnTypeX == TGSI_RETURN_TYPE_UINT)
> +         ctx->shader_req_bits |= SHADER_REQ_INTS;
>        if (ctx->info.indirect_files & (1 << TGSI_FILE_SAMPLER)) {
>           if (ctx->last_sampler_array_idx != -1) {
>              if
> (ctx->sampler_arrays[ctx->last_sampler_array_idx].sview_type ==
> decl->SamplerView.Resource &&
> --
> 2.14.3
>
> _______________________________________________
> virglrenderer-devel mailing list
> virglrenderer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/virglrenderer-devel/attachments/20180614/1137a640/attachment.html>


More information about the virglrenderer-devel mailing list