1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gl_4_6_autogen.cpp:
9 // Defines the GL 4.6 entry points.
10
11 #include "libGL/entry_points_gl_4_6_autogen.h"
12
13 #include "libANGLE/Context.h"
14 #include "libANGLE/Context.inl.h"
15 #include "libANGLE/entry_points_utils.h"
16 #include "libANGLE/gl_enum_utils_autogen.h"
17 #include "libANGLE/validationEGL.h"
18 #include "libANGLE/validationES.h"
19 #include "libANGLE/validationES1.h"
20 #include "libANGLE/validationES2.h"
21 #include "libANGLE/validationES3.h"
22 #include "libANGLE/validationES31.h"
23 #include "libANGLE/validationESEXT.h"
24 #include "libANGLE/validationGL46_autogen.h"
25 #include "libGLESv2/global_state.h"
26
27 namespace gl
28 {
MultiDrawArraysIndirectCount(GLenum mode,const void * indirect,GLintptr drawcount,GLsizei maxdrawcount,GLsizei stride)29 void GL_APIENTRY MultiDrawArraysIndirectCount(GLenum mode,
30 const void *indirect,
31 GLintptr drawcount,
32 GLsizei maxdrawcount,
33 GLsizei stride)
34 {
35 EVENT("(GLenum mode = %s, const void *indirect = 0x%016" PRIxPTR
36 ", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)",
37 GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect,
38 static_cast<unsigned long long>(drawcount), maxdrawcount, stride);
39
40 Context *context = GetValidGlobalContext();
41 if (context)
42 {
43 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
44 bool isCallValid = (context->skipValidation() ||
45 ValidateMultiDrawArraysIndirectCount(context, mode, indirect, drawcount,
46 maxdrawcount, stride));
47 if (isCallValid)
48 {
49 context->multiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride);
50 }
51 ANGLE_CAPTURE(MultiDrawArraysIndirectCount, isCallValid, context, mode, indirect, drawcount,
52 maxdrawcount, stride);
53 }
54 }
55
MultiDrawElementsIndirectCount(GLenum mode,GLenum type,const void * indirect,GLintptr drawcount,GLsizei maxdrawcount,GLsizei stride)56 void GL_APIENTRY MultiDrawElementsIndirectCount(GLenum mode,
57 GLenum type,
58 const void *indirect,
59 GLintptr drawcount,
60 GLsizei maxdrawcount,
61 GLsizei stride)
62 {
63 EVENT("(GLenum mode = %s, GLenum type = %s, const void *indirect = 0x%016" PRIxPTR
64 ", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)",
65 GLenumToString(GLenumGroup::PrimitiveType, mode),
66 GLenumToString(GLenumGroup::DefaultGroup, type), (uintptr_t)indirect,
67 static_cast<unsigned long long>(drawcount), maxdrawcount, stride);
68
69 Context *context = GetValidGlobalContext();
70 if (context)
71 {
72 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
73 bool isCallValid = (context->skipValidation() ||
74 ValidateMultiDrawElementsIndirectCount(
75 context, mode, type, indirect, drawcount, maxdrawcount, stride));
76 if (isCallValid)
77 {
78 context->multiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount,
79 stride);
80 }
81 ANGLE_CAPTURE(MultiDrawElementsIndirectCount, isCallValid, context, mode, type, indirect,
82 drawcount, maxdrawcount, stride);
83 }
84 }
85
PolygonOffsetClamp(GLfloat factor,GLfloat units,GLfloat clamp)86 void GL_APIENTRY PolygonOffsetClamp(GLfloat factor, GLfloat units, GLfloat clamp)
87 {
88 EVENT("(GLfloat factor = %f, GLfloat units = %f, GLfloat clamp = %f)", factor, units, clamp);
89
90 Context *context = GetValidGlobalContext();
91 if (context)
92 {
93 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
94 bool isCallValid = (context->skipValidation() ||
95 ValidatePolygonOffsetClamp(context, factor, units, clamp));
96 if (isCallValid)
97 {
98 context->polygonOffsetClamp(factor, units, clamp);
99 }
100 ANGLE_CAPTURE(PolygonOffsetClamp, isCallValid, context, factor, units, clamp);
101 }
102 }
103
SpecializeShader(GLuint shader,const GLchar * pEntryPoint,GLuint numSpecializationConstants,const GLuint * pConstantIndex,const GLuint * pConstantValue)104 void GL_APIENTRY SpecializeShader(GLuint shader,
105 const GLchar *pEntryPoint,
106 GLuint numSpecializationConstants,
107 const GLuint *pConstantIndex,
108 const GLuint *pConstantValue)
109 {
110 EVENT("(GLuint shader = %u, const GLchar *pEntryPoint = 0x%016" PRIxPTR
111 ", GLuint numSpecializationConstants = %u, const GLuint *pConstantIndex = 0x%016" PRIxPTR
112 ", const GLuint *pConstantValue = 0x%016" PRIxPTR ")",
113 shader, (uintptr_t)pEntryPoint, numSpecializationConstants, (uintptr_t)pConstantIndex,
114 (uintptr_t)pConstantValue);
115
116 Context *context = GetValidGlobalContext();
117 if (context)
118 {
119 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
120 bool isCallValid =
121 (context->skipValidation() ||
122 ValidateSpecializeShader(context, shader, pEntryPoint, numSpecializationConstants,
123 pConstantIndex, pConstantValue));
124 if (isCallValid)
125 {
126 context->specializeShader(shader, pEntryPoint, numSpecializationConstants,
127 pConstantIndex, pConstantValue);
128 }
129 ANGLE_CAPTURE(SpecializeShader, isCallValid, context, shader, pEntryPoint,
130 numSpecializationConstants, pConstantIndex, pConstantValue);
131 }
132 }
133 } // namespace gl
134