diff --git a/src/virgl_hw.h b/src/virgl_hw.h index b27b698..05a088c 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -291,6 +291,7 @@ struct virgl_caps_v2 { uint32_t texture_buffer_offset_alignment; uint32_t uniform_buffer_offset_alignment; uint32_t tgsi_invariant; + uint32_t shader_buffer_offset_alignment; }; union virgl_caps { diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index ef19fce..2fa0f2a 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6678,6 +6678,9 @@ void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version, glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &caps->v2.uniform_buffer_offset_alignment); + if (gles_ver >= 31) + glGetIntegerv(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT, &caps->v2.shader_buffer_offset_alignment); + /* Not available on GLES */ caps->v2.texture_buffer_offset_alignment = 0; } @@ -6872,8 +6875,10 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version, glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &caps->v2.uniform_buffer_offset_alignment); - if (gl_ver >= 43) + if (gl_ver >= 43) { glGetIntegerv(GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT, &caps->v2.texture_buffer_offset_alignment); + glGetIntegerv(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT, &caps->v2.shader_buffer_offset_alignment); + } caps->v2.tgsi_invariant = 1; }