From 97b9df0aa8953382d5ed313921f878758172b4a5 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 20 Jul 2018 11:04:34 +0200 Subject: [PATCH] add a cap for TGSI precise modifiers This way, mesa can know that the TGSI-parser groks the _PRECISE modifier, and it doesn't need to cull them any more. Signed-off-by: Erik Faye-Lund Reviewed-by: Gurchetan Singh Signed-off-by: Dave Airlie --- src/virgl_hw.h | 1 + src/vrend_renderer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/virgl_hw.h b/src/virgl_hw.h index 4add191..bf8cd74 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -221,6 +221,7 @@ enum virgl_formats { #define VIRGL_CAP_TEXTURE_VIEW (1 << 1) #define VIRGL_CAP_SET_MIN_SAMPLES (1 << 2) #define VIRGL_CAP_COPY_IMAGE (1 << 3) +#define VIRGL_CAP_TGSI_PRECISE (1 << 4) struct virgl_caps_bool_set1 { unsigned indep_blend_enable:1; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index c768f71..3129292 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -7753,7 +7753,7 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version, caps->v1.max_samples = vrend_renderer_query_multisample_caps(max, &caps->v2); - caps->v2.capability_bits |= VIRGL_CAP_TGSI_INVARIANT | VIRGL_CAP_SET_MIN_SAMPLES; + caps->v2.capability_bits |= VIRGL_CAP_TGSI_INVARIANT | VIRGL_CAP_SET_MIN_SAMPLES | VIRGL_CAP_TGSI_PRECISE; if (gl_ver >= 44) glGetIntegerv(GL_MAX_VERTEX_ATTRIB_STRIDE, (GLint*)&caps->v2.max_vertex_attrib_stride);