mesa: support OVR_multiview2
this reuses the same pipe cap to indicate that both extensions are supported Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
This commit is contained in:

committed by
Marge Bot

parent
1491ce46e4
commit
3b99f9bc0e
@@ -654,7 +654,7 @@ The integer capabilities:
|
||||
* ``PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_STAGES``: Bitmask of shader stages which support GL_KHR_shader_subgroup_* intrinsics.
|
||||
* ``PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_FEATURES``: Bitmask of shader subgroup features listed in :ext:`GL_KHR_shader_subgroup`.
|
||||
* ``PIPE_CAP_SHADER_SUBGROUP_QUAD_ALL_STAGES``: Whether shader subgroup quad operations are supported by shader stages other than fragment shader.
|
||||
* ``PIPE_CAP_MULTIVIEW``: Whether multiview rendering of array textures is supported.
|
||||
* ``PIPE_CAP_MULTIVIEW``: Whether multiview rendering of array textures is supported. A return of ``1`` indicates support for OVR_multiview, and ``2`` additionally supports OVR_multiview2.
|
||||
|
||||
|
||||
.. _pipe_capf:
|
||||
|
@@ -847,6 +847,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
|
||||
EXT(NV_shader_noperspective_interpolation),
|
||||
EXT(NV_viewport_array2),
|
||||
EXT(OVR_multiview),
|
||||
EXT(OVR_multiview2),
|
||||
};
|
||||
|
||||
#undef EXT
|
||||
|
@@ -936,6 +936,8 @@ struct _mesa_glsl_parse_state {
|
||||
bool NV_viewport_array2_warn;
|
||||
bool OVR_multiview_enable;
|
||||
bool OVR_multiview_warn;
|
||||
bool OVR_multiview2_enable;
|
||||
bool OVR_multiview2_warn;
|
||||
/*@}*/
|
||||
|
||||
/** Extensions supported by the OpenGL implementation. */
|
||||
|
@@ -224,6 +224,7 @@ struct gl_extensions
|
||||
GLboolean OES_texture_view;
|
||||
GLboolean OES_viewport_array;
|
||||
GLboolean OVR_multiview;
|
||||
GLboolean OVR_multiview2;
|
||||
/* vendor extensions */
|
||||
GLboolean AMD_compressed_ATC_texture;
|
||||
GLboolean AMD_framebuffer_multisample_advanced;
|
||||
|
@@ -506,6 +506,7 @@ EXT(OES_vertex_array_object , dummy_true
|
||||
EXT(OES_vertex_half_float , ARB_half_float_vertex , x , x , x , ES2, 2005)
|
||||
EXT(OES_viewport_array , OES_viewport_array , x , x , x , 31, 2010)
|
||||
EXT(OVR_multiview , OVR_multiview , GLL, GLC, x , 30, 2018)
|
||||
EXT(OVR_multiview2 , OVR_multiview2 , GLL, GLC, x , 30, 2018)
|
||||
EXT(S3_s3tc , ANGLE_texture_compression_dxt , GLL, GLC, x , x , 1999)
|
||||
|
||||
EXT(SGIS_generate_mipmap , dummy_true , GLL, x , x , x , 1997)
|
||||
|
@@ -908,7 +908,6 @@ void st_init_extensions(struct pipe_screen *screen,
|
||||
{ o(INTEL_blackhole_render), PIPE_CAP_FRONTEND_NOOP },
|
||||
{ o(ARM_shader_framebuffer_fetch_depth_stencil), PIPE_CAP_FBFETCH_ZS },
|
||||
{ o(MESA_texture_const_bandwidth), PIPE_CAP_HAS_CONST_BW },
|
||||
{ o(OVR_multiview) , PIPE_CAP_MULTIVIEW },
|
||||
};
|
||||
|
||||
/* Required: render target and sampler support */
|
||||
@@ -1288,6 +1287,16 @@ void st_init_extensions(struct pipe_screen *screen,
|
||||
extensions->ARB_arrays_of_arrays = GL_TRUE;
|
||||
extensions->MESA_shader_integer_functions = GL_TRUE;
|
||||
|
||||
switch (screen->get_param(screen, PIPE_CAP_MULTIVIEW)) {
|
||||
case 1:
|
||||
extensions->OVR_multiview = GL_TRUE;
|
||||
break;
|
||||
case 2:
|
||||
extensions->OVR_multiview = GL_TRUE;
|
||||
extensions->OVR_multiview2 = GL_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (screen->get_param(screen, PIPE_CAP_OPENCL_INTEGER_FUNCTIONS) &&
|
||||
screen->get_param(screen, PIPE_CAP_INTEGER_MULTIPLY_32X16)) {
|
||||
extensions->INTEL_shader_integer_functions2 = GL_TRUE;
|
||||
|
Reference in New Issue
Block a user