From: Gert Wollny Date: Tue, 7 May 2019 17:50:46 +0000 (+0200) Subject: virgl: Enable CAP_CLIP_HALFZ if host supports it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8657257a6e0f15f5411193de964ba6e512df0f8b;p=mesa.git virgl: Enable CAP_CLIP_HALFZ if host supports it On according hosts this enables the piglits as "pass": arb_clip_control-* v2: sync flag with host Signed-off-by: Gert Wollny Reviewed-by: Chia-I Wu (v1) Reviewed-by: Emil Velikov --- diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h index bc6803faa03..a01c48dd41f 100644 --- a/src/gallium/drivers/virgl/virgl_hw.h +++ b/src/gallium/drivers/virgl/virgl_hw.h @@ -242,6 +242,7 @@ enum virgl_formats { #define VIRGL_CAP_INDIRECT_PARAMS (1 << 22) #define VIRGL_CAP_TRANSFORM_FEEDBACK3 (1 << 23) #define VIRGL_CAP_INDIRECT_INPUT_ADDR (1 << 25) +#define VIRGL_CAP_CLIP_HALFZ (1 << 27) /* virgl bind flags - these are compatible with mesa 10.5 gallium. diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 2880aa3a4dc..29f1b5b20c3 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -280,7 +280,6 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: - case PIPE_CAP_CLIP_HALFZ: case PIPE_CAP_VERTEXID_NOBASE: case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: case PIPE_CAP_RESOURCE_FROM_USER_MEMORY: @@ -341,6 +340,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS: case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET: return 0; + case PIPE_CAP_CLIP_HALFZ: + return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_CLIP_HALFZ; case PIPE_CAP_MAX_GS_INVOCATIONS: return 32; case PIPE_CAP_MAX_SHADER_BUFFER_SIZE: