aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-07-17 15:43:57 +1000
committerDave Airlie <[email protected]>2018-07-17 15:45:37 +1000
commit591b7009440cef9fa0dd3bc09512a7a2906ef33d (patch)
treeedb5687794d5056b6656d003990a6e40ff02ccb5 /src
parent04e278f79334c36f2afa315d3dcfcbec055a4d2a (diff)
virgl: respect max_vertex_attrib_stride cap
This is required for OpenGL 4.4 and OpenGL ES 3.1 support. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/virgl_hw.h3
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c3
-rw-r--r--src/gallium/drivers/virgl/virgl_winsys.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
index 118249e6950..f501da7cc13 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -300,7 +300,8 @@ struct virgl_caps_v2 {
uint32_t uniform_buffer_offset_alignment;
uint32_t shader_buffer_offset_alignment;
uint32_t capability_bits;
- uint32_t msaa_sample_positions[8];
+ uint32_t msaa_sample_positions[8];
+ uint32_t max_vertex_attrib_stride;
};
union virgl_caps {
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 8bd6673c3c9..e32d454d19b 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -219,6 +219,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
return vscreen->caps.caps.v2.max_shader_patch_varyings;
case PIPE_CAP_SAMPLER_VIEW_TARGET:
return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_TEXTURE_VIEW;
+ case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
+ return vscreen->caps.caps.v2.max_vertex_attrib_stride;
case PIPE_CAP_TEXTURE_GATHER_SM5:
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
case PIPE_CAP_FAKE_SW_MSAA:
@@ -226,7 +228,6 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
case PIPE_CAP_MULTI_DRAW_INDIRECT:
case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
- case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
case PIPE_CAP_CLIP_HALFZ:
case PIPE_CAP_VERTEXID_NOBASE:
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
diff --git a/src/gallium/drivers/virgl/virgl_winsys.h b/src/gallium/drivers/virgl/virgl_winsys.h
index 99ab4d38405..6346c21fafc 100644
--- a/src/gallium/drivers/virgl/virgl_winsys.h
+++ b/src/gallium/drivers/virgl/virgl_winsys.h
@@ -136,5 +136,6 @@ static inline void virgl_ws_fill_new_caps_defaults(struct virgl_drm_caps *caps)
caps->caps.v2.uniform_buffer_offset_alignment = 256;
caps->caps.v2.shader_buffer_offset_alignment = 32;
caps->caps.v2.capability_bits = 0;
+ caps->caps.v2.max_vertex_attrib_stride = 0;
}
#endif