• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_1_2_autogen.cpp:
9 //   Defines the GL 1.2 entry points.
10 
11 #include "libGL/entry_points_gl_1_2_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/validationGL12_autogen.h"
25 #include "libGLESv2/global_state.h"
26 
27 namespace gl
28 {
CopyTexSubImage3D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)29 void GL_APIENTRY CopyTexSubImage3D(GLenum target,
30                                    GLint level,
31                                    GLint xoffset,
32                                    GLint yoffset,
33                                    GLint zoffset,
34                                    GLint x,
35                                    GLint y,
36                                    GLsizei width,
37                                    GLsizei height)
38 {
39     EVENT(
40         "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
41         "zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
42         GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, zoffset, x, y,
43         width, height);
44 
45     Context *context = GetValidGlobalContext();
46     if (context)
47     {
48         TextureTarget targetPacked                    = FromGL<TextureTarget>(target);
49         std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
50         bool isCallValid                              = (context->skipValidation() ||
51                             ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset,
52                                                       yoffset, zoffset, x, y, width, height));
53         if (isCallValid)
54         {
55             context->copyTexSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, x, y, width,
56                                        height);
57         }
58         ANGLE_CAPTURE(CopyTexSubImage3D, isCallValid, context, targetPacked, level, xoffset,
59                       yoffset, zoffset, x, y, width, height);
60     }
61 }
62 
DrawRangeElements(GLenum mode,GLuint start,GLuint end,GLsizei count,GLenum type,const void * indices)63 void GL_APIENTRY DrawRangeElements(GLenum mode,
64                                    GLuint start,
65                                    GLuint end,
66                                    GLsizei count,
67                                    GLenum type,
68                                    const void *indices)
69 {
70     EVENT(
71         "(GLenum mode = %s, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type = "
72         "%s, const void *indices = 0x%016" PRIxPTR ")",
73         GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count,
74         GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices);
75 
76     Context *context = GetValidGlobalContext();
77     if (context)
78     {
79         PrimitiveMode modePacked                      = FromGL<PrimitiveMode>(mode);
80         DrawElementsType typePacked                   = FromGL<DrawElementsType>(type);
81         std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
82         bool isCallValid =
83             (context->skipValidation() || ValidateDrawRangeElements(context, modePacked, start, end,
84                                                                     count, typePacked, indices));
85         if (isCallValid)
86         {
87             context->drawRangeElements(modePacked, start, end, count, typePacked, indices);
88         }
89         ANGLE_CAPTURE(DrawRangeElements, isCallValid, context, modePacked, start, end, count,
90                       typePacked, indices);
91     }
92 }
93 
TexImage3D(GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const void * pixels)94 void GL_APIENTRY TexImage3D(GLenum target,
95                             GLint level,
96                             GLint internalformat,
97                             GLsizei width,
98                             GLsizei height,
99                             GLsizei depth,
100                             GLint border,
101                             GLenum format,
102                             GLenum type,
103                             const void *pixels)
104 {
105     EVENT(
106         "(GLenum target = %s, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, "
107         "GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = %s, GLenum "
108         "type = %s, const void *pixels = 0x%016" PRIxPTR ")",
109         GLenumToString(GLenumGroup::TextureTarget, target), level, internalformat, width, height,
110         depth, border, GLenumToString(GLenumGroup::PixelFormat, format),
111         GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
112 
113     Context *context = GetValidGlobalContext();
114     if (context)
115     {
116         TextureTarget targetPacked                    = FromGL<TextureTarget>(target);
117         std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
118         bool isCallValid                              = (context->skipValidation() ||
119                             ValidateTexImage3D(context, targetPacked, level, internalformat, width,
120                                                height, depth, border, format, type, pixels));
121         if (isCallValid)
122         {
123             context->texImage3D(targetPacked, level, internalformat, width, height, depth, border,
124                                 format, type, pixels);
125         }
126         ANGLE_CAPTURE(TexImage3D, isCallValid, context, targetPacked, level, internalformat, width,
127                       height, depth, border, format, type, pixels);
128     }
129 }
130 
TexSubImage3D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * pixels)131 void GL_APIENTRY TexSubImage3D(GLenum target,
132                                GLint level,
133                                GLint xoffset,
134                                GLint yoffset,
135                                GLint zoffset,
136                                GLsizei width,
137                                GLsizei height,
138                                GLsizei depth,
139                                GLenum format,
140                                GLenum type,
141                                const void *pixels)
142 {
143     EVENT(
144         "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
145         "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
146         "= %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR ")",
147         GLenumToString(GLenumGroup::TextureTarget, target), level, xoffset, yoffset, zoffset, width,
148         height, depth, GLenumToString(GLenumGroup::PixelFormat, format),
149         GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
150 
151     Context *context = GetValidGlobalContext();
152     if (context)
153     {
154         TextureTarget targetPacked                    = FromGL<TextureTarget>(target);
155         std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
156         bool isCallValid =
157             (context->skipValidation() ||
158              ValidateTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, width,
159                                    height, depth, format, type, pixels));
160         if (isCallValid)
161         {
162             context->texSubImage3D(targetPacked, level, xoffset, yoffset, zoffset, width, height,
163                                    depth, format, type, pixels);
164         }
165         ANGLE_CAPTURE(TexSubImage3D, isCallValid, context, targetPacked, level, xoffset, yoffset,
166                       zoffset, width, height, depth, format, type, pixels);
167     }
168 }
169 }  // namespace gl
170