mesa: GL_ARB_ES3_2_compatibility GL compat profile support
Patch removes 'desktop=false' from aliased function, otherwise glPrimitiveBoundingBox[ARB] cannot be retrieved via GetProcAddress. This was seen with new OpenGL 4.5 tests that utilize GL_ARB_ES3_2_compatibility and bounding box API. v2: fixes to display list support (Ilia Mirkin) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12846>
This commit is contained in:
parent
8564a4c584
commit
205b684725
|
@ -8402,7 +8402,7 @@
|
|||
<category name="es3.2">
|
||||
<!-- This should be in es_EXT, but this file is included first and
|
||||
the alias doesn't work otherwise. -->
|
||||
<function name="PrimitiveBoundingBox" es2="3.2" desktop="false">
|
||||
<function name="PrimitiveBoundingBox" es2="3.2">
|
||||
<param name="minX" type="GLfloat"/>
|
||||
<param name="minY" type="GLfloat"/>
|
||||
<param name="minZ" type="GLfloat"/>
|
||||
|
|
|
@ -626,6 +626,9 @@ typedef enum
|
|||
OPCODE_NAMED_PROGRAM_STRING,
|
||||
OPCODE_NAMED_PROGRAM_LOCAL_PARAMETER,
|
||||
|
||||
/* GL_ARB_ES3_2_compatibility */
|
||||
OPCODE_PRIMITIVE_BOUNDING_BOX,
|
||||
|
||||
OPCODE_VERTEX_LIST,
|
||||
OPCODE_VERTEX_LIST_LOOPBACK,
|
||||
OPCODE_VERTEX_LIST_COPY_CURRENT,
|
||||
|
@ -11108,6 +11111,29 @@ save_NamedProgramLocalParameter4dvEXT(GLuint program, GLenum target, GLuint inde
|
|||
(GLfloat) params[3]);
|
||||
}
|
||||
|
||||
static void GLAPIENTRY
|
||||
save_PrimitiveBoundingBox(float minX, float minY, float minZ, float minW,
|
||||
float maxX, float maxY, float maxZ, float maxW)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
n = alloc_instruction(ctx, OPCODE_PRIMITIVE_BOUNDING_BOX, 8);
|
||||
if (n) {
|
||||
n[1].f = minX;
|
||||
n[2].f = minY;
|
||||
n[3].f = minZ;
|
||||
n[4].f = minW;
|
||||
n[5].f = maxX;
|
||||
n[6].f = maxY;
|
||||
n[7].f = maxZ;
|
||||
n[8].f = maxW;
|
||||
}
|
||||
if (ctx->ExecuteFlag) {
|
||||
CALL_PrimitiveBoundingBox(ctx->Exec, (minX, minY, minZ, minW,
|
||||
maxX, maxY, maxZ, maxW));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save an error-generating command into display list.
|
||||
|
@ -13363,6 +13389,11 @@ execute_list(struct gl_context *ctx, GLuint list)
|
|||
n[5].f, n[6].f, n[7].f));
|
||||
break;
|
||||
|
||||
case OPCODE_PRIMITIVE_BOUNDING_BOX:
|
||||
CALL_PrimitiveBoundingBox(ctx->Exec,
|
||||
(n[1].f, n[2].f, n[3].f, n[4].f,
|
||||
n[5].f, n[6].f, n[7].f, n[8].f));
|
||||
break;
|
||||
case OPCODE_VERTEX_LIST:
|
||||
vbo_save_playback_vertex_list(ctx, &n[1], false);
|
||||
break;
|
||||
|
@ -14670,6 +14701,9 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
|
|||
SET_NamedProgramLocalParameter4dvEXT(table, save_NamedProgramLocalParameter4dvEXT);
|
||||
SET_NamedProgramLocalParameter4fEXT(table, save_NamedProgramLocalParameter4fEXT);
|
||||
SET_NamedProgramLocalParameter4fvEXT(table, save_NamedProgramLocalParameter4fvEXT);
|
||||
|
||||
/* GL_ARB_ES3_2_compatibility */
|
||||
SET_PrimitiveBoundingBox(table, save_PrimitiveBoundingBox);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ EXT(APPLE_texture_max_level , dummy_true
|
|||
|
||||
EXT(ARB_ES2_compatibility , ARB_ES2_compatibility , GLL, GLC, x , x , 2009)
|
||||
EXT(ARB_ES3_1_compatibility , ARB_ES3_1_compatibility , GLL, GLC, x , x , 2014)
|
||||
EXT(ARB_ES3_2_compatibility , ARB_ES3_2_compatibility , x , GLC, x , x , 2015)
|
||||
EXT(ARB_ES3_2_compatibility , ARB_ES3_2_compatibility , GLL, GLC, x , x , 2015)
|
||||
EXT(ARB_ES3_compatibility , ARB_ES3_compatibility , GLL, GLC, x , x , 2012)
|
||||
EXT(ARB_arrays_of_arrays , ARB_arrays_of_arrays , GLL, GLC, x , x , 2012)
|
||||
EXT(ARB_base_instance , ARB_base_instance , GLL, GLC, x , x , 2011)
|
||||
|
|
|
@ -1463,6 +1463,9 @@ const struct function common_desktop_functions_possible[] = {
|
|||
/* GL_NV_viewport_swizzle */
|
||||
{ "glViewportSwizzleNV", 11, -1 },
|
||||
|
||||
/* ARB_ES3_2_compatibility */
|
||||
{ "glPrimitiveBoundingBoxARB", 45, -1 },
|
||||
|
||||
{ "glInternalBufferSubDataCopyMESA", 11, -1 },
|
||||
{ "glInternalSetError", 20, -1 },
|
||||
|
||||
|
@ -1995,9 +1998,6 @@ const struct function gl_compatibility_functions_possible[] = {
|
|||
};
|
||||
|
||||
const struct function gl_core_functions_possible[] = {
|
||||
/* GL_ARB_ES3_2_compatibility */
|
||||
{ "glPrimitiveBoundingBoxARB", 45, -1 },
|
||||
|
||||
/* GL_ARB_gl_spirv */
|
||||
{ "glSpecializeShaderARB", 45, -1 },
|
||||
|
||||
|
|
Loading…
Reference in New Issue