[Mesa-dev] [PATCH] Add virgl cap for invariant attrib in tgsi

Dave Airlie airlied at gmail.com
Mon Apr 30 19:56:22 UTC 2018


On 10 April 2018 at 08:01, Joe M. Kniss <djmk at chromium.org> wrote:
> While some support for invariant shader attribute exisits in
> tgsi, it was never fully implemented.  This patch adds a virgl
> cap for this feature in advance of the tgsi invariant implementation
> to insure backward compatibility.  Current virglrenderer tgsi
> deserialization will error if invariant apprears in tgsi text stream.
>
> Signed-off-by: Joe M. Kniss <djmk at google.com>
> ---
>  src/gallium/drivers/virgl/virgl_hw.h     | 1 +
>  src/gallium/drivers/virgl/virgl_tgsi.c   | 5 +++++
>  src/gallium/drivers/virgl/virgl_winsys.h | 1 +
>  3 files changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
> index 93849c03dd..aaa4704b2a 100644
> --- a/src/gallium/drivers/virgl/virgl_hw.h
> +++ b/src/gallium/drivers/virgl/virgl_hw.h
> @@ -286,6 +286,7 @@ struct virgl_caps_v2 {
>          int32_t max_texture_gather_offset;
>          uint32_t texture_buffer_offset_alignment;
>          uint32_t uniform_buffer_offset_alignment;
> +        uint32_t tgsi_invariant;
>  };

Btw this landed and it's fine, but in the future, can we add a 32-bit
set of fields
for single-bit information caps.

Otherwise we end up with quite a bit of wastage.

Dave.


More information about the mesa-dev mailing list