From c3f7873b9a3af998ec6e9132f07f331f3f14d306 Mon Sep 17 00:00:00 2001 From: Jiacheng Lu Date: Fri, 30 Aug 2019 15:00:52 -0600 Subject: [PATCH] Use TransformFeedbackID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ib8fbec89f28645790df98a184f47303f4a8d64c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779343 Commit-Queue: Jamie Madill Reviewed-by: Tobin Ehlis --- .../GL_EGL_entry_points.json | 32 +- scripts/entry_point_packed_gl_enums.json | 1591 +++++++++-------- src/common/PackedEnums.h | 35 +- src/libANGLE/Context.cpp | 35 +- src/libANGLE/Context.h | 10 +- src/libANGLE/Context_gl.cpp | 10 +- src/libANGLE/Context_gl_4_0_autogen.h | 4 +- src/libANGLE/Context_gl_4_2_autogen.h | 7 +- src/libANGLE/Context_gles_3_0_autogen.h | 8 +- src/libANGLE/FrameCapture.cpp | 61 +- src/libANGLE/FrameCapture.h | 40 +- src/libANGLE/State.cpp | 5 +- src/libANGLE/State.h | 3 +- src/libANGLE/TransformFeedback.cpp | 6 +- src/libANGLE/TransformFeedback.h | 2 +- src/libANGLE/TransformFeedback_unittest.cpp | 2 +- src/libANGLE/capture_gles_3_0_autogen.cpp | 28 +- src/libANGLE/capture_gles_3_0_autogen.h | 28 +- src/libANGLE/capture_gles_3_0_params.cpp | 20 +- src/libANGLE/frame_capture_replay_autogen.cpp | 14 +- src/libANGLE/frame_capture_utils_autogen.cpp | 18 + src/libANGLE/frame_capture_utils_autogen.h | 65 + .../renderer/gl/cgl/WindowSurfaceCGL.mm | 210 +-- src/libANGLE/validationES2.cpp | 2 +- src/libANGLE/validationES3.cpp | 8 +- src/libANGLE/validationES3_autogen.h | 10 +- src/libANGLE/validationGL4.cpp | 7 +- src/libANGLE/validationGL42.cpp | 4 +- src/libANGLE/validationGL42_autogen.h | 4 +- src/libANGLE/validationGL4_autogen.h | 7 +- src/libGL/entry_points_gl_4_0_autogen.cpp | 43 +- src/libGL/entry_points_gl_4_2_autogen.cpp | 19 +- .../entry_points_gles_3_0_autogen.cpp | 29 +- .../entry_points_gles_ext_autogen.cpp | 29 +- 34 files changed, 1275 insertions(+), 1121 deletions(-) diff --git a/scripts/code_generation_hashes/GL_EGL_entry_points.json b/scripts/code_generation_hashes/GL_EGL_entry_points.json index 18b95ac9e..163d6ba76 100644 --- a/scripts/code_generation_hashes/GL_EGL_entry_points.json +++ b/scripts/code_generation_hashes/GL_EGL_entry_points.json @@ -4,7 +4,7 @@ "scripts/egl_angle_ext.xml": "fc2e249239fb1365f6d145cdf1a3cfcf", "scripts/entry_point_packed_gl_enums.json": - "53963b4a4f5cac8fcfbaa77ee0573f4c", + "5550f249db54a698036d5d9aa65e043b", "scripts/generate_entry_points.py": "00dc8410ad87e122314ac58579445188", "scripts/gl.xml": @@ -40,11 +40,11 @@ "src/libANGLE/Context_gl_3_3_autogen.h": "b7b4c2cb4ed98e35b176dca69fdb99e0", "src/libANGLE/Context_gl_4_0_autogen.h": - "705747dd674f10cbdc5b32cc8fc0348b", + "b4e36aa1bad2089a19c9242ce2e0e987", "src/libANGLE/Context_gl_4_1_autogen.h": "70d3e9df0ed7bf67cc83a97b93263803", "src/libANGLE/Context_gl_4_2_autogen.h": - "4ca9c02624ba930d7f81d6a72c4c3574", + "a9ec9401726ec6c0a85374c8f24e91f1", "src/libANGLE/Context_gl_4_3_autogen.h": "b28ecd6043c07a9d902ec4311afd8188", "src/libANGLE/Context_gl_4_4_autogen.h": @@ -58,7 +58,7 @@ "src/libANGLE/Context_gles_2_0_autogen.h": "f243d85c9d1c94c0d7302e0a57af56b6", "src/libANGLE/Context_gles_3_0_autogen.h": - "49231f9a98736a31f3e84586bcdadd83", + "7254debb6acecdd915cc8a5bc266adc6", "src/libANGLE/Context_gles_3_1_autogen.h": "8aef8ceb87eed9cc7e9586f6c98796e3", "src/libANGLE/Context_gles_ext_autogen.h": @@ -72,9 +72,9 @@ "src/libANGLE/capture_gles_2_0_autogen.h": "1d7c76f7dfcb666161bc4675932511c5", "src/libANGLE/capture_gles_3_0_autogen.cpp": - "0342167a9578ec32d4aed57d21ec6719", + "0ccdb5401c2630ecc2bbd0bcbc1559f0", "src/libANGLE/capture_gles_3_0_autogen.h": - "98df5f3d3bb76f34f6417b2d5b66e62d", + "47530c15422e03b9cc224533eed1f2f7", "src/libANGLE/capture_gles_3_1_autogen.cpp": "1de6bb30272e7b4b29e508a64c7d2e63", "src/libANGLE/capture_gles_3_1_autogen.h": @@ -88,11 +88,11 @@ "src/libANGLE/entry_points_enum_autogen.h": "f028ca107fe86e586e676a32863d2167", "src/libANGLE/frame_capture_replay_autogen.cpp": - "97b8d0380f51e3f3baf5ef450cf939b1", + "1e4e55ea044ff8fc3764622a2f1cf240", "src/libANGLE/frame_capture_utils_autogen.cpp": - "f25628b32cebb72f7ef831cbb27f5daf", + "7465f826ea0196541bddd95540b0f599", "src/libANGLE/frame_capture_utils_autogen.h": - "aa6e389c20a70b9ba20bafabd5d552aa", + "4d16f676a1f5f70a882161fcb585db5b", "src/libANGLE/validationES1_autogen.h": "8d3131d2bf2e6f521f46b44e64a6bff9", "src/libANGLE/validationES2_autogen.h": @@ -100,7 +100,7 @@ "src/libANGLE/validationES31_autogen.h": "9bf34098be328bee8f9fc04d1afbdfde", "src/libANGLE/validationES3_autogen.h": - "ecc93502fd279ef2343de2dc1eb35bfc", + "1b470a8e190aa007f093f1f13f3b1a8c", "src/libANGLE/validationESEXT_autogen.h": "be09aaed9df3427c782ea788c1327025", "src/libANGLE/validationGL11_autogen.h": @@ -130,7 +130,7 @@ "src/libANGLE/validationGL41_autogen.h": "b5028bd55850579cabd6a687f1904616", "src/libANGLE/validationGL42_autogen.h": - "ab583998d8116efd22e001149c6a479e", + "0b6dc77764f5361aa3e29964694545f7", "src/libANGLE/validationGL43_autogen.h": "9ccf805631c9ee51440a07f232efb3e8", "src/libANGLE/validationGL44_autogen.h": @@ -140,7 +140,7 @@ "src/libANGLE/validationGL46_autogen.h": "08a145cbeb4ea627ce94c65cd881cc5d", "src/libANGLE/validationGL4_autogen.h": - "e99c17ac2dc2fb59707514888099cd18", + "b5c8218b206e1862b329e061ece1a5ef", "src/libGL/entry_points_gl_1_0_autogen.cpp": "bf3679cbb617daced44bca2f8ca011a0", "src/libGL/entry_points_gl_1_0_autogen.h": @@ -190,7 +190,7 @@ "src/libGL/entry_points_gl_3_3_autogen.h": "2151c64b03364111ad1455609243caba", "src/libGL/entry_points_gl_4_0_autogen.cpp": - "a93dac2bbe4f76e6f0f38f808680bcae", + "daa6a5284562847cc5802589a9396deb", "src/libGL/entry_points_gl_4_0_autogen.h": "c5a258322ee6de37ffdbb6f40d5703a2", "src/libGL/entry_points_gl_4_1_autogen.cpp": @@ -198,7 +198,7 @@ "src/libGL/entry_points_gl_4_1_autogen.h": "ea1e18bf5ed2bd1063c940bd793cb50c", "src/libGL/entry_points_gl_4_2_autogen.cpp": - "5e1aad849cfd617673dca8a9932729aa", + "fa5d4f69bf45bc75ce07b9551c2484b5", "src/libGL/entry_points_gl_4_2_autogen.h": "e6b93e1c3028230ebf5ba8a09f5f4aca", "src/libGL/entry_points_gl_4_3_autogen.cpp": @@ -230,7 +230,7 @@ "src/libGLESv2/entry_points_gles_2_0_autogen.h": "3bbaf1cf42fba5d675e5b54cd1d14df7", "src/libGLESv2/entry_points_gles_3_0_autogen.cpp": - "55b9cd11f35b58f83b0baf3f211fb43b", + "e0ec5aae2046f3cb7de9d51594024fe9", "src/libGLESv2/entry_points_gles_3_0_autogen.h": "395f6978219abd5182bbe80cc367e40c", "src/libGLESv2/entry_points_gles_3_1_autogen.cpp": @@ -238,7 +238,7 @@ "src/libGLESv2/entry_points_gles_3_1_autogen.h": "043d09a964c740067bf4279e0b544aed", "src/libGLESv2/entry_points_gles_ext_autogen.cpp": - "74e9c751a445934646d20b78e0168c10", + "891cbeff3ee5e5eee5d476a5a1a41eae", "src/libGLESv2/entry_points_gles_ext_autogen.h": "fea36fa137e55dd2f244dbb49d31cc41", "src/libGLESv2/libGLESv2_autogen.cpp": diff --git a/scripts/entry_point_packed_gl_enums.json b/scripts/entry_point_packed_gl_enums.json index f6e5cb462..373f24de5 100644 --- a/scripts/entry_point_packed_gl_enums.json +++ b/scripts/entry_point_packed_gl_enums.json @@ -9,31 +9,44 @@ "Note that all entry points have their suffixes stripped in this file.", "See gen_packed_gl_enums.py for the generator that uses this data." ], - + "glActiveShaderProgram": { + "pipeline": "ProgramPipelineID", + "program": "ShaderProgramID" + }, "glAlphaFunc": { "func": "AlphaTestFunc" }, "glAlphaFuncx": { "func": "AlphaTestFunc" }, + "glAttachShader": { + "program": "ShaderProgramID", + "shader": "ShaderProgramID" + }, "glBeginQuery": { - "target": "QueryType", + "id": "QueryID", + "target": "QueryType" + }, + "glBeginQueryIndexed": { "id": "QueryID" }, "glBeginTransformFeedback": { "primitiveMode": "PrimitiveMode" }, + "glBindAttribLocation": { + "program": "ShaderProgramID" + }, "glBindBuffer": { - "target": "BufferBinding", - "buffer": "BufferID" + "buffer": "BufferID", + "target": "BufferBinding" }, "glBindBufferBase": { - "target": "BufferBinding", - "buffer": "BufferID" + "buffer": "BufferID", + "target": "BufferBinding" }, "glBindBufferRange": { - "target": "BufferBinding", - "buffer": "BufferID" + "buffer": "BufferID", + "target": "BufferBinding" }, "glBindBuffersBase": { "buffers": "const BufferID *" @@ -41,9 +54,24 @@ "glBindBuffersRange": { "buffers": "const BufferID *" }, + "glBindFragDataLocation": { + "program": "ShaderProgramID" + }, + "glBindFragDataLocationIndexed": { + "program": "ShaderProgramID" + }, + "glBindFragmentInputLocation": { + "programs": "ShaderProgramID" + }, + "glBindFramebuffer": { + "framebuffer": "FramebufferID" + }, "glBindImageTexture": { "texture": "TextureID" }, + "glBindProgramPipeline": { + "pipeline": "ProgramPipelineID" + }, "glBindRenderbuffer": { "renderbuffer": "RenderbufferID" }, @@ -57,6 +85,15 @@ "glBindTextureUnit": { "texture": "TextureID" }, + "glBindTransformFeedback": { + "id": "TransformFeedbackID" + }, + "glBindUniformLocation": { + "program": "ShaderProgramID" + }, + "glBindVertexArray": { + "array": "VertexArrayID" + }, "glBindVertexBuffer": { "buffer": "BufferID" }, @@ -68,18 +105,33 @@ "usage": "BufferUsage" }, "glBufferStorageMem": { - "target": "TextureType", - "memory": "MemoryObjectID" + "memory": "MemoryObjectID", + "target": "TextureType" }, "glBufferSubData": { "target": "BufferBinding" }, + "glCheckNamedFramebufferStatus": { + "framebuffer": "FramebufferID" + }, "glClearNamedBufferData": { "buffer": "BufferID" }, "glClearNamedBufferSubData": { "buffer": "BufferID" }, + "glClearNamedFramebufferfi": { + "framebuffer": "FramebufferID" + }, + "glClearNamedFramebufferfv": { + "framebuffer": "FramebufferID" + }, + "glClearNamedFramebufferiv": { + "framebuffer": "FramebufferID" + }, + "glClearNamedFramebufferuiv": { + "framebuffer": "FramebufferID" + }, "glClearTexImage": { "texture": "TextureID" }, @@ -89,9 +141,12 @@ "glColorPointer": { "type": "VertexAttribType" }, + "glCompileShader": { + "shader": "ShaderProgramID" + }, "glCompressedCopyTexture": { - "sourceId": "TextureID", - "destId": "TextureID" + "destId": "TextureID", + "sourceId": "TextureID" }, "glCompressedTexImage2D": { "target": "TextureTarget" @@ -137,14 +192,14 @@ "writeTarget": "BufferBinding" }, "glCopySubTexture": { + "destId": "TextureID", "destTarget": "TextureTarget", - "sourceId": "TextureID", - "destId": "TextureID" + "sourceId": "TextureID" }, "glCopySubTexture3D": { + "destId": "TextureID", "destTarget": "TextureTarget", - "sourceId": "TextureID", - "destId": "TextureID" + "sourceId": "TextureID" }, "glCopyTexImage2D": { "target": "TextureTarget" @@ -156,14 +211,14 @@ "target": "TextureTarget" }, "glCopyTexture": { + "destId": "TextureID", "destTarget": "TextureTarget", - "sourceId": "TextureID", - "destId": "TextureID" + "sourceId": "TextureID" }, "glCopyTexture3D": { + "destId": "TextureID", "destTarget": "TextureTarget", - "sourceId": "TextureID", - "destId": "TextureID" + "sourceId": "TextureID" }, "glCopyTextureSubImage1D": { "texture": "TextureID" @@ -174,9 +229,24 @@ "glCopyTextureSubImage3D": { "texture": "TextureID" }, + "glCoverFillPath": { + "path": "PathID" + }, + "glCoverFillPathInstanced": { + "pathBase": "PathID" + }, + "glCoverStrokePath": { + "path": "PathID" + }, + "glCoverStrokePathInstanced": { + "pathBase": "PathID" + }, "glCreateBuffers": { "buffers": "BufferID *" }, + "glCreateMemoryObjects": { + "memoryObjects": "MemoryObjectID *" + }, "glCreateRenderbuffers": { "renderbuffers": "RenderbufferID *" }, @@ -186,24 +256,67 @@ "glCreateShaderProgramv": { "type": "ShaderType" }, + "glCreateVertexArrays": { + "arrays": "VertexArrayID *" + }, "glCullFace": { "mode": "CullFaceMode" }, "glDeleteBuffers": { "buffers": "const BufferID *" }, + "glDeleteFencesNV": { + "fences": "const FenceNVID *" + }, + "glDeleteFramebuffers": { + "framebuffers": "const FramebufferID *" + }, + "glDeleteMemoryObjects": { + "memoryObjects": "const MemoryObjectID *" + }, + "glDeletePaths": { + "first": "PathID" + }, + "glDeleteProgram": { + "program": "ShaderProgramID" + }, + "glDeleteProgramPipelines": { + "pipelines": "const ProgramPipelineID *" + }, + "glDeleteQueries": { + "ids": "const QueryID *" + }, "glDeleteRenderbuffers": { "renderbuffers": "const RenderbufferID *" }, "glDeleteSamplers": { "samplers": "const SamplerID *" }, + "glDeleteSemaphores": { + "semaphores": "const SemaphoreID *" + }, + "glDeleteShader": { + "shader": "ShaderProgramID" + }, "glDeleteTextures": { "textures": "const TextureID *" }, + "glDeleteTransformFeedbacks": { + "ids": "const TransformFeedbackID *" + }, + "glDeleteVertexArrays": { + "arrays": "const VertexArrayID *" + }, + "glDetachShader": { + "program": "ShaderProgramID", + "shader": "ShaderProgramID" + }, "glDisableClientState": { "array": "ClientVertexArrayType" }, + "glDisableVertexArrayAttrib": { + "vaobj": "VertexArrayID" + }, "glDrawArrays": { "mode": "PrimitiveMode" }, @@ -236,15 +349,39 @@ "mode": "PrimitiveMode", "type": "DrawElementsType" }, + "glDrawTransformFeedback": { + "id": "TransformFeedbackID" + }, + "glDrawTransformFeedbackInstanced": { + "id": "TransformFeedbackID" + }, + "glDrawTransformFeedbackStream": { + "id": "TransformFeedbackID" + }, + "glDrawTransformFeedbackStreamInstanced": { + "id": "TransformFeedbackID" + }, "glEGLImageTargetTexture2D": { "target": "TextureType" }, "glEnableClientState": { "array": "ClientVertexArrayType" }, + "glEnableVertexArrayAttrib": { + "vaobj": "VertexArrayID" + }, "glEndQuery": { "target": "QueryType" }, + "glExtGetProgramBinarySource": { + "program": "ShaderProgramID" + }, + "glExtIsProgramBinary": { + "program": "ShaderProgramID" + }, + "glFinishFenceNV": { + "fence": "FenceNVID" + }, "glFlushMappedBufferRange": { "target": "BufferBinding" }, @@ -285,15 +422,76 @@ "glGenerateTextureMipmap": { "texture": "TextureID" }, + "glGenFencesNV": { + "fences": "FenceNVID *" + }, + "glGenFramebuffers": { + "framebuffers": "FramebufferID *" + }, + "glGenProgramPipelines": { + "pipelines": "ProgramPipelineID *" + }, + "glGenQueries": { + "ids": "QueryID *" + }, "glGenRenderbuffers": { "renderbuffers": "RenderbufferID *" }, "glGenSamplers": { "samplers": "SamplerID *" }, + "glGenSemaphores": { + "semaphores": "SemaphoreID *" + }, "glGenTextures": { "textures": "TextureID *" }, + "glGenTransformFeedbacks": { + "ids": "TransformFeedbackID *" + }, + "glGenVertexArrays": { + "arrays": "VertexArrayID *" + }, + "glGetActiveAtomicCounterBufferiv": { + "program": "ShaderProgramID" + }, + "glGetActiveAttrib": { + "program": "ShaderProgramID" + }, + "glGetActiveSubroutineName": { + "program": "ShaderProgramID" + }, + "glGetActiveSubroutineUniformiv": { + "program": "ShaderProgramID" + }, + "glGetActiveSubroutineUniformName": { + "program": "ShaderProgramID" + }, + "glGetActiveUniform": { + "program": "ShaderProgramID" + }, + "glGetActiveUniformBlockiv": { + "program": "ShaderProgramID" + }, + "glGetActiveUniformBlockivRobust": { + "program": "ShaderProgramID" + }, + "glGetActiveUniformBlockName": { + "program": "ShaderProgramID" + }, + "glGetActiveUniformName": { + "program": "ShaderProgramID" + }, + "glGetActiveUniformsiv": { + "program": "ShaderProgramID" + }, + "glGetAttachedShaders": { + "program": "ShaderProgramID", + "shaders": "ShaderProgramID *" + }, + "glGetAttribLocation": { + "program": "ShaderProgramID" + }, "glGetBufferParameteri64v": { "target": "BufferBinding" }, @@ -318,6 +516,15 @@ "glGetCompressedTextureSubImage": { "texture": "TextureID" }, + "glGetFenceivNV": { + "fence": "FenceNVID" + }, + "glGetFragDataIndex": { + "program": "ShaderProgramID" + }, + "glGetFragDataLocation": { + "program": "ShaderProgramID" + }, "glGetLightfv": { "pname": "LightParameter" }, @@ -330,6 +537,9 @@ "glGetMaterialxv": { "pname": "MaterialParameter" }, + "glGetMemoryObjectParameteriv": { + "memoryObject": "MemoryObjectID" + }, "glGetNamedBufferParameteri64v": { "buffer": "BufferID" }, @@ -342,9 +552,102 @@ "glGetNamedBufferSubData": { "buffer": "BufferID" }, + "glGetNamedFramebufferAttachmentParameteriv": { + "framebuffer": "FramebufferID" + }, + "glGetNamedFramebufferParameteriv": { + "framebuffer": "FramebufferID" + }, "glGetNamedRenderbufferParameteriv": { "renderbuffer": "RenderbufferID" }, + "glGetnUniformdv": { + "program": "ShaderProgramID" + }, + "glGetnUniformfv": { + "program": "ShaderProgramID" + }, + "glGetnUniformfvRobust": { + "program": "ShaderProgramID" + }, + "glGetnUniformiv": { + "program": "ShaderProgramID" + }, + "glGetnUniformivRobust": { + "program": "ShaderProgramID" + }, + "glGetnUniformuiv": { + "program": "ShaderProgramID" + }, + "glGetnUniformuivRobust": { + "program": "ShaderProgramID" + }, + "glGetPathCommands": { + "path": "PathID" + }, + "glGetPathCoords": { + "path": "PathID" + }, + "glGetPathDashArray": { + "path": "PathID" + }, + "glGetPathLength": { + "path": "PathID" + }, + "glGetPathMetrics": { + "pathBase": "PathID" + }, + "glGetPathParameterfv": { + "path": "PathID" + }, + "glGetPathParameteriv": { + "path": "PathID" + }, + "glGetPathSpacing": { + "pathBase": "PathID" + }, + "glGetProgramBinary": { + "program": "ShaderProgramID" + }, + "glGetProgramInfoLog": { + "program": "ShaderProgramID" + }, + "glGetProgramInterfaceiv": { + "program": "ShaderProgramID" + }, + "glGetProgramInterfaceivRobust": { + "program": "ShaderProgramID" + }, + "glGetProgramiv": { + "program": "ShaderProgramID" + }, + "glGetProgramivRobust": { + "program": "ShaderProgramID" + }, + "glGetProgramPipelineInfoLog": { + "pipeline": "ProgramPipelineID" + }, + "glGetProgramPipelineiv": { + "pipeline": "ProgramPipelineID" + }, + "glGetProgramResourceIndex": { + "program": "ShaderProgramID" + }, + "glGetProgramResourceiv": { + "program": "ShaderProgramID" + }, + "glGetProgramResourceLocation": { + "program": "ShaderProgramID" + }, + "glGetProgramResourceLocationIndex": { + "program": "ShaderProgramID" + }, + "glGetProgramResourceName": { + "program": "ShaderProgramID" + }, + "glGetProgramStageiv": { + "program": "ShaderProgramID" + }, "glGetQueryBufferObjecti64v": { "buffer": "BufferID" }, @@ -361,7 +664,31 @@ "target": "QueryType" }, "glGetQueryivRobust": { - "target": "QueryType", + "id": "QueryID", + "target": "QueryType" + }, + "glGetQueryObjecti64v": { + "id": "QueryID" + }, + "glGetQueryObjecti64vRobust": { + "id": "QueryID" + }, + "glGetQueryObjectiv": { + "id": "QueryID" + }, + "glGetQueryObjectivRobust": { + "id": "QueryID" + }, + "glGetQueryObjectui64v": { + "id": "QueryID" + }, + "glGetQueryObjectui64vRobust": { + "id": "QueryID" + }, + "glGetQueryObjectuiv": { + "id": "QueryID" + }, + "glGetQueryObjectuivRobust": { "id": "QueryID" }, "glGetSamplerParameterfv": { @@ -388,17 +715,41 @@ "glGetSamplerParameterivRobust": { "sampler": "SamplerID" }, + "glGetSemaphoreParameterui64v": { + "semaphore": "SemaphoreID" + }, + "glGetShaderInfoLog": { + "shader": "ShaderProgramID" + }, + "glGetShaderiv": { + "shader": "ShaderProgramID" + }, + "glGetShaderivRobust": { + "shader": "ShaderProgramID" + }, + "glGetShaderPrecisionFormat": { + "shader": "ShaderProgramID" + }, + "glGetShaderSource": { + "shader": "ShaderProgramID" + }, + "glGetSubroutineIndex": { + "program": "ShaderProgramID" + }, + "glGetSubroutineUniformLocation": { + "program": "ShaderProgramID" + }, "glGetTexEnvfv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glGetTexEnviv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glGetTexEnvxv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glGetTexLevelParameterfv": { "target": "TextureTarget" @@ -463,13 +814,62 @@ "glGetTextureSubImage": { "texture": "TextureID" }, + "glGetTransformFeedbackVarying": { + "program": "ShaderProgramID" + }, + "glGetTranslatedShaderSource": { + "shader": "ShaderProgramID" + }, + "glGetUniformBlockIndex": { + "program": "ShaderProgramID" + }, + "glGetUniformdv": { + "program": "ShaderProgramID" + }, + "glGetUniformfv": { + "program": "ShaderProgramID" + }, + "glGetUniformfvRobust": { + "program": "ShaderProgramID" + }, + "glGetUniformIndices": { + "program": "ShaderProgramID" + }, + "glGetUniformiv": { + "program": "ShaderProgramID" + }, + "glGetUniformivRobust": { + "program": "ShaderProgramID" + }, + "glGetUniformLocation": { + "program": "ShaderProgramID" + }, + "glGetUniformuiv": { + "program": "ShaderProgramID" + }, + "glGetUniformuivRobust": { + "program": "ShaderProgramID" + }, + "glGetVertexArrayIndexed64iv": { + "vaobj": "VertexArrayID" + }, + "glGetVertexArrayIndexediv": { + "vaobj": "VertexArrayID" + }, + "glGetVertexArrayiv": { + "vaobj": "VertexArrayID" + }, "glImportMemoryFd": { - "memory": "MemoryObjectID", - "handleType": "HandleType" + "handleType": "HandleType", + "memory": "MemoryObjectID" }, "glImportSemaphoreFd": { - "semaphore": "SemaphoreID", - "handleType": "HandleType" + "handleType": "HandleType", + "semaphore": "SemaphoreID" + }, + "glInterpolatePaths": { + "pathA": "PathID", + "pathB": "PathID" }, "glInvalidateBufferData": { "buffer": "BufferID" @@ -477,6 +877,12 @@ "glInvalidateBufferSubData": { "buffer": "BufferID" }, + "glInvalidateNamedFramebufferData": { + "framebuffer": "FramebufferID" + }, + "glInvalidateNamedFramebufferSubData": { + "framebuffer": "FramebufferID" + }, "glInvalidateTexImage": { "texture": "TextureID" }, @@ -489,15 +895,54 @@ "glIsBuffer": { "buffer": "BufferID" }, + "glIsFenceNV": { + "fence": "FenceNVID" + }, + "glIsFramebuffer": { + "framebuffer": "FramebufferID" + }, + "glIsMemoryObject": { + "memoryObject": "MemoryObjectID" + }, + "glIsPath": { + "path": "PathID" + }, + "glIsPointInFillPath": { + "path": "PathID" + }, + "glIsPointInStrokePath": { + "path": "PathID" + }, + "glIsProgram": { + "program": "ShaderProgramID" + }, + "glIsProgramPipeline": { + "pipeline": "ProgramPipelineID" + }, + "glIsQuery": { + "id": "QueryID" + }, "glIsRenderbuffer": { "renderbuffer": "RenderbufferID" }, "glIsSampler": { "sampler": "SamplerID" }, + "glIsSemaphore": { + "semaphore": "SemaphoreID" + }, + "glIsShader": { + "shader": "ShaderProgramID" + }, "glIsTexture": { "texture": "TextureID" }, + "glIsTransformFeedback": { + "id": "TransformFeedbackID" + }, + "glIsVertexArray": { + "array": "VertexArrayID" + }, "glLightf": { "pname": "LightParameter" }, @@ -510,6 +955,9 @@ "glLightxv": { "pname": "LightParameter" }, + "glLinkProgram": { + "program": "ShaderProgramID" + }, "glLogicOp": { "opcode": "LogicalOperation" }, @@ -544,6 +992,9 @@ "glMatrixMode": { "mode": "MatrixType" }, + "glMemoryObjectParameteriv": { + "memoryObject": "MemoryObjectID" + }, "glMultiDrawArrays": { "mode": "PrimitiveMode" }, @@ -574,6 +1025,18 @@ "glNamedBufferSubData": { "buffer": "BufferID" }, + "glNamedFramebufferDrawBuffer": { + "framebuffer": "FramebufferID" + }, + "glNamedFramebufferDrawBuffers": { + "framebuffer": "FramebufferID" + }, + "glNamedFramebufferParameteri": { + "framebuffer": "FramebufferID" + }, + "glNamedFramebufferReadBuffer": { + "framebuffer": "FramebufferID" + }, "glNamedFramebufferRenderbuffer": { "framebuffer": "FramebufferID", "renderbuffer": "RenderbufferID" @@ -595,6 +1058,54 @@ "glNormalPointer": { "type": "VertexAttribType" }, + "glPathCommands": { + "path": "PathID" + }, + "glPathCoords": { + "path": "PathID" + }, + "glPathDashArray": { + "path": "PathID" + }, + "glPathGlyphIndexArray": { + "path": "PathID" + }, + "glPathGlyphIndexRange": { + "path": "PathID" + }, + "glPathGlyphRange": { + "pathParameterTemplate": "PathID" + }, + "glPathGlyphs": { + "pathParameterTemplate": "PathID" + }, + "glPathMemoryGlyphIndexArray": { + "path": "PathID" + }, + "glPathParameterf": { + "path": "PathID" + }, + "glPathParameterfv": { + "path": "PathID" + }, + "glPathParameteri": { + "path": "PathID" + }, + "glPathParameteriv": { + "path": "PathID" + }, + "glPathString": { + "path": "PathID" + }, + "glPathSubCommands": { + "path": "PathID" + }, + "glPathSubCoords": { + "path": "PathID" + }, + "glPointAlongPath": { + "path": "PathID" + }, "glPointParameterf": { "pname": "PointParameter" }, @@ -610,12 +1121,171 @@ "glPointSizePointer": { "type": "VertexAttribType" }, + "glProgramBinary": { + "program": "ShaderProgramID" + }, + "glProgramParameteri": { + "program": "ShaderProgramID" + }, + "glProgramPathFragmentInputGen": { + "program": "ShaderProgramID" + }, + "glProgramUniform1d": { + "program": "ShaderProgramID" + }, + "glProgramUniform1dv": { + "program": "ShaderProgramID" + }, + "glProgramUniform1f": { + "program": "ShaderProgramID" + }, + "glProgramUniform1fv": { + "program": "ShaderProgramID" + }, + "glProgramUniform1i": { + "program": "ShaderProgramID" + }, + "glProgramUniform1iv": { + "program": "ShaderProgramID" + }, + "glProgramUniform1ui": { + "program": "ShaderProgramID" + }, + "glProgramUniform1uiv": { + "program": "ShaderProgramID" + }, + "glProgramUniform2d": { + "program": "ShaderProgramID" + }, + "glProgramUniform2dv": { + "program": "ShaderProgramID" + }, + "glProgramUniform2f": { + "program": "ShaderProgramID" + }, + "glProgramUniform2fv": { + "program": "ShaderProgramID" + }, + "glProgramUniform2i": { + "program": "ShaderProgramID" + }, + "glProgramUniform2iv": { + "program": "ShaderProgramID" + }, + "glProgramUniform2ui": { + "program": "ShaderProgramID" + }, + "glProgramUniform2uiv": { + "program": "ShaderProgramID" + }, + "glProgramUniform3d": { + "program": "ShaderProgramID" + }, + "glProgramUniform3dv": { + "program": "ShaderProgramID" + }, + "glProgramUniform3f": { + "program": "ShaderProgramID" + }, + "glProgramUniform3fv": { + "program": "ShaderProgramID" + }, + "glProgramUniform3i": { + "program": "ShaderProgramID" + }, + "glProgramUniform3iv": { + "program": "ShaderProgramID" + }, + "glProgramUniform3ui": { + "program": "ShaderProgramID" + }, + "glProgramUniform3uiv": { + "program": "ShaderProgramID" + }, + "glProgramUniform4d": { + "program": "ShaderProgramID" + }, + "glProgramUniform4dv": { + "program": "ShaderProgramID" + }, + "glProgramUniform4f": { + "program": "ShaderProgramID" + }, + "glProgramUniform4fv": { + "program": "ShaderProgramID" + }, + "glProgramUniform4i": { + "program": "ShaderProgramID" + }, + "glProgramUniform4iv": { + "program": "ShaderProgramID" + }, + "glProgramUniform4ui": { + "program": "ShaderProgramID" + }, + "glProgramUniform4uiv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2x3dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2x3fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2x4dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix2x4fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3x2dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3x2fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3x4dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix3x4fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4x2dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4x2fv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4x3dv": { + "program": "ShaderProgramID" + }, + "glProgramUniformMatrix4x3fv": { + "program": "ShaderProgramID" + }, "glProvokingVertex": { "mode": "ProvokingVertexConvention" }, "glQueryCounter": { - "target": "QueryType", - "id": "QueryID" + "id": "QueryID", + "target": "QueryType" }, "glSamplerParameterf": { "sampler": "SamplerID" @@ -647,14 +1317,56 @@ "glSamplerParameterivRobust": { "sampler": "SamplerID" }, + "glSemaphoreParameterui64v": { + "semaphore": "SemaphoreID" + }, + "glSetFenceNV": { + "fence": "FenceNVID" + }, "glShadeModel": { "mode": "ShadingModel" }, + "glShaderBinary": { + "shaders": "const ShaderProgramID *" + }, + "glShaderSource": { + "shader": "ShaderProgramID" + }, + "glShaderStorageBlockBinding": { + "program": "ShaderProgramID" + }, "glSignalSemaphore": { - "semaphore": "SemaphoreID", "buffers": "const BufferID *", + "semaphore": "SemaphoreID", "textures": "const TextureID *" }, + "glStencilFillPath": { + "path": "PathID" + }, + "glStencilFillPathInstanced": { + "pathBase": "PathID" + }, + "glStencilStrokePath": { + "path": "PathID" + }, + "glStencilStrokePathInstanced": { + "pathBase": "PathID" + }, + "glStencilThenCoverFillPath": { + "path": "PathID" + }, + "glStencilThenCoverFillPathInstanced": { + "pathBase": "PathID" + }, + "glStencilThenCoverStrokePath": { + "path": "PathID" + }, + "glStencilThenCoverStrokePathInstanced": { + "pathBase": "PathID" + }, + "glTestFenceNV": { + "fence": "FenceNVID" + }, "glTexBuffer": { "buffer": "BufferID" }, @@ -665,28 +1377,28 @@ "type": "VertexAttribType" }, "glTexEnvf": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexEnvfv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexEnvi": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexEnviv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexEnvx": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexEnvxv": { - "target": "TextureEnvTarget", - "pname": "TextureEnvParameter" + "pname": "TextureEnvParameter", + "target": "TextureEnvTarget" }, "glTexImage2D": { "target": "TextureTarget" @@ -752,20 +1464,20 @@ "target": "TextureType" }, "glTexStorageMem2D": { - "target": "TextureType", - "memory": "MemoryObjectID" + "memory": "MemoryObjectID", + "target": "TextureType" }, "glTexStorageMem2DMultisample": { - "target": "TextureType", - "memory": "MemoryObjectID" + "memory": "MemoryObjectID", + "target": "TextureType" }, "glTexStorageMem3D": { - "target": "TextureType", - "memory": "MemoryObjectID" + "memory": "MemoryObjectID", + "target": "TextureType" }, "glTexStorageMem3DMultisample": { - "target": "TextureType", - "memory": "MemoryObjectID" + "memory": "MemoryObjectID", + "target": "TextureType" }, "glTexSubImage2D": { "target": "TextureTarget" @@ -838,23 +1550,57 @@ "glTransformFeedbackBufferRange": { "buffer": "BufferID" }, + "glTransformFeedbackVaryings": { + "program": "ShaderProgramID" + }, + "glUniformBlockBinding": { + "program": "ShaderProgramID" + }, "glUnmapBuffer": { "target": "BufferBinding" }, "glUnmapNamedBuffer": { "buffer": "BufferID" }, + "glUseProgram": { + "program": "ShaderProgramID" + }, + "glUseProgramStages": { + "pipeline": "ProgramPipelineID", + "program": "ShaderProgramID" + }, + "glValidateProgram": { + "program": "ShaderProgramID" + }, + "glValidateProgramPipeline": { + "pipeline": "ProgramPipelineID" + }, + "glVertexArrayAttribBinding": { + "vaobj": "VertexArrayID" + }, + "glVertexArrayAttribFormat": { + "vaobj": "VertexArrayID" + }, + "glVertexArrayAttribIFormat": { + "vaobj": "VertexArrayID" + }, + "glVertexArrayAttribLFormat": { + "vaobj": "VertexArrayID" + }, + "glVertexArrayBindingDivisor": { + "vaobj": "VertexArrayID" + }, "glVertexArrayElementBuffer": { - "vaobj": "VertexArrayID", - "buffer": "BufferID" + "buffer": "BufferID", + "vaobj": "VertexArrayID" }, "glVertexArrayVertexBuffer": { - "vaobj": "VertexArrayID", - "buffer": "BufferID" + "buffer": "BufferID", + "vaobj": "VertexArrayID" }, "glVertexArrayVertexBuffers": { - "vaobj": "VertexArrayID", - "buffers": "const BufferID *" + "buffers": "const BufferID *", + "vaobj": "VertexArrayID" }, "glVertexAttribFormat": { "type": "VertexAttribType" @@ -872,731 +1618,8 @@ "type": "VertexAttribType" }, "glWaitSemaphore": { - "semaphore": "SemaphoreID", "buffers": "const BufferID *", + "semaphore": "SemaphoreID", "textures": "const TextureID *" - }, - "glIsFenceNV": { - "fence": "FenceNVID" - }, - "glTestFenceNV": { - "fence": "FenceNVID" - }, - "glGetFenceivNV": { - "fence": "FenceNVID" - }, - "glFinishFenceNV": { - "fence": "FenceNVID" - }, - "glSetFenceNV": { - "fence": "FenceNVID" - }, - "glDeleteFencesNV": { - "fences": "const FenceNVID *" - }, - "glGenFencesNV": { - "fences": "FenceNVID *" - }, - "glGenQueries": { - "ids": "QueryID *" - }, - "glDeleteQueries": { - "ids": "const QueryID *" - }, - "glBeginQueryIndexed": { - "id": "QueryID" - }, - "glIsQuery": { - "id": "QueryID" - }, - "glGetQueryObjectuiv": { - "id": "QueryID" - }, - "glGetQueryObjectiv": { - "id": "QueryID" - }, - "glGetQueryObjecti64v": { - "id": "QueryID" - }, - "glGetQueryObjectui64v": { - "id": "QueryID" - }, - "glGetQueryObjectivRobust": { - "id": "QueryID" - }, - "glGetQueryObjecti64vRobust": { - "id": "QueryID" - }, - "glGetQueryObjectui64vRobust": { - "id": "QueryID" - }, - "glGetQueryObjectuivRobust": { - "id": "QueryID" - }, - "glDeletePaths": { - "first": "PathID" - }, - "glIsPath": { - "path": "PathID" - }, - "glPathCommands": { - "path": "PathID" - }, - "glPathCoords": { - "path": "PathID" - }, - "glPathSubCommands": { - "path": "PathID" - }, - "glPathSubCoords": { - "path": "PathID" - }, - "glPathString": { - "path": "PathID" - }, - "glPathGlyphs": { - "pathParameterTemplate": "PathID" - }, - "glPathGlyphRange": { - "pathParameterTemplate": "PathID" - }, - "glInterpolatePaths": { - "pathA": "PathID", - "pathB": "PathID" - }, - "glPathParameteriv": { - "path": "PathID" - }, - "glPathParameteri": { - "path": "PathID" - }, - "glPathParameterfv": { - "path": "PathID" - }, - "glPathParameterf": { - "path": "PathID" - }, - "glPathDashArray": { - "path": "PathID" - }, - "glStencilStrokePath": { - "path": "PathID" - }, - "glStencilFillPath": { - "path": "PathID" - }, - "glStencilFillPathInstanced": { - "pathBase": "PathID" - }, - "glStencilStrokePathInstanced": { - "pathBase": "PathID" - }, - "glCoverFillPath": { - "path": "PathID" - }, - "glCoverStrokePath": { - "path": "PathID" - }, - "glCoverFillPathInstanced": { - "pathBase": "PathID" - }, - "glCoverStrokePathInstanced": { - "pathBase": "PathID" - }, - "glGetPathParameteriv": { - "path": "PathID" - }, - "glGetPathParameterfv": { - "path": "PathID" - }, - "glGetPathCommands": { - "path": "PathID" - }, - "glGetPathCoords": { - "path": "PathID" - }, - "glGetPathDashArray": { - "path": "PathID" - }, - "glGetPathMetrics": { - "pathBase": "PathID" - }, - "glGetPathSpacing": { - "pathBase": "PathID" - }, - "glIsPointInFillPath": { - "path": "PathID" - }, - "glIsPointInStrokePath": { - "path": "PathID" - }, - "glGetPathLength": { - "path": "PathID" - }, - "glPointAlongPath": { - "path": "PathID" - }, - "glStencilThenCoverFillPath": { - "path": "PathID" - }, - "glStencilThenCoverStrokePath": { - "path": "PathID" - }, - "glStencilThenCoverFillPathInstanced": { - "pathBase": "PathID" - }, - "glStencilThenCoverStrokePathInstanced": { - "pathBase": "PathID" - }, - "glPathGlyphIndexRange": { - "path": "PathID" - }, - "glPathGlyphIndexArray": { - "path": "PathID" - }, - "glPathMemoryGlyphIndexArray": { - "path": "PathID" - }, - "glUseProgramStages": { - "pipeline": "ProgramPipelineID", - "program": "ShaderProgramID" - }, - "glActiveShaderProgram": { - "pipeline": "ProgramPipelineID", - "program": "ShaderProgramID" - }, - "glBindProgramPipeline": { - "pipeline": "ProgramPipelineID" - }, - "glValidateProgramPipeline": { - "pipeline": "ProgramPipelineID" - }, - "glGetProgramPipelineInfoLog": { - "pipeline": "ProgramPipelineID" - }, - "glIsProgramPipeline": { - "pipeline": "ProgramPipelineID" - }, - "glGetProgramPipelineiv": { - "pipeline": "ProgramPipelineID" - }, - "glGenProgramPipelines": { - "pipelines": "ProgramPipelineID *" - }, - "glDeleteProgramPipelines": { - "pipelines": "const ProgramPipelineID *" - }, - "glAttachShader": { - "program": "ShaderProgramID", - "shader": "ShaderProgramID" - }, - "glCompileShader": { - "shader": "ShaderProgramID" - }, - "glDeleteShader": { - "shader": "ShaderProgramID" - }, - "glGetAttachedShaders": { - "program": "ShaderProgramID", - "shaders": "ShaderProgramID *" - }, - "glDetachShader": { - "program": "ShaderProgramID", - "shader": "ShaderProgramID" - }, - "glGetShaderiv": { - "shader": "ShaderProgramID" - }, - "glGetShaderInfoLog": { - "shader": "ShaderProgramID" - }, - "glGetShaderPrecisionFormat": { - "shader": "ShaderProgramID" - }, - "glGetShaderSource": { - "shader": "ShaderProgramID" - }, - "glIsShader": { - "shader": "ShaderProgramID" - }, - "glShaderSource": { - "shader": "ShaderProgramID" - }, - "glShaderBinary": { - "shaders": "const ShaderProgramID *" - }, - "glGetShaderivRobust" : { - "shader": "ShaderProgramID" - }, - "glGetTranslatedShaderSource": { - "shader": "ShaderProgramID" - }, - "glGetnUniformfv": { - "program": "ShaderProgramID" - }, - "glGetnUniformiv": { - "program": "ShaderProgramID" - }, - "glExtIsProgramBinary": { - "program": "ShaderProgramID" - }, - "glExtGetProgramBinarySource": { - "program": "ShaderProgramID" - }, - "glBindAttribLocation": { - "program": "ShaderProgramID" - }, - "glDeleteProgram": { - "program": "ShaderProgramID" - }, - "glGetActiveAttrib": { - "program": "ShaderProgramID" - }, - "glGetActiveUniform": { - "program": "ShaderProgramID" - }, - "glGetAttribLocation": { - "program": "ShaderProgramID" - }, - "glGetProgramiv": { - "program": "ShaderProgramID" - }, - "glGetProgramInfoLog": { - "program": "ShaderProgramID" - }, - "glGetUniformfv": { - "program": "ShaderProgramID" - }, - "glGetUniformiv": { - "program": "ShaderProgramID" - }, - "glGetUniformLocation": { - "program": "ShaderProgramID" - }, - "glIsProgram": { - "program": "ShaderProgramID" - }, - "glLinkProgram": { - "program": "ShaderProgramID" - }, - "glUseProgram": { - "program": "ShaderProgramID" - }, - "glValidateProgram": { - "program": "ShaderProgramID" - }, - "glGetProgramivRobust": { - "program": "ShaderProgramID" - }, - "glGetUniformfvRobust": { - "program": "ShaderProgramID" - }, - "glGetUniformivRobust": { - "program": "ShaderProgramID" - }, - "glGetUniformuivRobust": { - "program": "ShaderProgramID" - }, - "glGetActiveUniformBlockivRobust": { - "program": "ShaderProgramID" - }, - "glGetProgramInterfaceivRobust": { - "program": "ShaderProgramID" - }, - "glGetnUniformfvRobust": { - "program": "ShaderProgramID" - }, - "glGetnUniformivRobust": { - "program": "ShaderProgramID" - }, - "glGetnUniformuivRobust": { - "program": "ShaderProgramID" - }, - "glGetProgramBinary": { - "program": "ShaderProgramID" - }, - "glProgramBinary": { - "program": "ShaderProgramID" - }, - "glBindFragDataLocationIndexed": { - "program": "ShaderProgramID" - }, - "glBindFragDataLocation": { - "program": "ShaderProgramID" - }, - "glGetProgramResourceLocationIndex": { - "program": "ShaderProgramID" - }, - "glGetFragDataIndex": { - "program": "ShaderProgramID" - }, - "glProgramParameteri": { - "program": "ShaderProgramID" - }, - "glProgramUniform1f": { - "program": "ShaderProgramID" - }, - "glProgramUniform1fv": { - "program": "ShaderProgramID" - }, - "glProgramUniform1i": { - "program": "ShaderProgramID" - }, - "glProgramUniform1iv": { - "program": "ShaderProgramID" - }, - "glProgramUniform2f": { - "program": "ShaderProgramID" - }, - "glProgramUniform2fv": { - "program": "ShaderProgramID" - }, - "glProgramUniform2i": { - "program": "ShaderProgramID" - }, - "glProgramUniform2iv": { - "program": "ShaderProgramID" - }, - "glProgramUniform3f": { - "program": "ShaderProgramID" - }, - "glProgramUniform3fv": { - "program": "ShaderProgramID" - }, - "glProgramUniform3i": { - "program": "ShaderProgramID" - }, - "glProgramUniform3iv": { - "program": "ShaderProgramID" - }, - "glProgramUniform4f": { - "program": "ShaderProgramID" - }, - "glProgramUniform4fv": { - "program": "ShaderProgramID" - }, - "glProgramUniform4i": { - "program": "ShaderProgramID" - }, - "glProgramUniform4iv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4fv": { - "program": "ShaderProgramID" - }, - "glProgramUniform1ui": { - "program": "ShaderProgramID" - }, - "glProgramUniform2ui": { - "program": "ShaderProgramID" - }, - "glProgramUniform3ui": { - "program": "ShaderProgramID" - }, - "glProgramUniform4ui": { - "program": "ShaderProgramID" - }, - "glProgramUniform1uiv": { - "program": "ShaderProgramID" - }, - "glProgramUniform2uiv": { - "program": "ShaderProgramID" - }, - "glProgramUniform3uiv": { - "program": "ShaderProgramID" - }, - "glProgramUniform4uiv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2x3fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3x2fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2x4fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4x2fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3x4fv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4x3fv": { - "program": "ShaderProgramID" - }, - "glBindUniformLocation": { - "program": "ShaderProgramID" - }, - "glBindFragmentInputLocation": { - "programs": "ShaderProgramID" - }, - "glProgramPathFragmentInputGen": { - "program": "ShaderProgramID" - }, - "glGetProgramInterfaceiv": { - "program": "ShaderProgramID" - }, - "glGetProgramResourceName": { - "program": "ShaderProgramID" - }, - "glGetProgramResourceiv": { - "program": "ShaderProgramID" - }, - "glGetProgramResourceLocation": { - "program": "ShaderProgramID" - }, - "glGetProgramResourceIndex": { - "program": "ShaderProgramID" - }, - "glGetUniformuiv": { - "program": "ShaderProgramID" - }, - "glGetFragDataLocation": { - "program": "ShaderProgramID" - }, - "glGetUniformIndices": { - "program": "ShaderProgramID" - }, - "glGetActiveUniformsiv": { - "program": "ShaderProgramID" - }, - "glGetUniformBlockIndex": { - "program": "ShaderProgramID" - }, - "glGetActiveUniformBlockiv": { - "program": "ShaderProgramID" - }, - "glGetActiveUniformBlockName": { - "program": "ShaderProgramID" - }, - "glUniformBlockBinding": { - "program": "ShaderProgramID" - }, - "glTransformFeedbackVaryings": { - "program": "ShaderProgramID" - }, - "glGetTransformFeedbackVarying": { - "program": "ShaderProgramID" - }, - "glGetnUniformuiv": { - "program": "ShaderProgramID" - }, - "glGetnUniformdv": { - "program": "ShaderProgramID" - }, - "glGetActiveUniformName": { - "program": "ShaderProgramID" - }, - "glGetActiveSubroutineUniformName": { - "program": "ShaderProgramID" - }, - "glGetActiveSubroutineUniformiv": { - "program": "ShaderProgramID" - }, - "glGetActiveSubroutineName": { - "program": "ShaderProgramID" - }, - "glGetProgramStageiv": { - "program": "ShaderProgramID" - }, - "glGetSubroutineIndex": { - "program": "ShaderProgramID" - }, - "glGetSubroutineUniformLocation": { - "program": "ShaderProgramID" - }, - "glGetUniformdv": { - "program": "ShaderProgramID" - }, - "glProgramUniform1d": { - "program": "ShaderProgramID" - }, - "glProgramUniform1dv": { - "program": "ShaderProgramID" - }, - "glProgramUniform2d": { - "program": "ShaderProgramID" - }, - "glProgramUniform2dv": { - "program": "ShaderProgramID" - }, - "glProgramUniform3d": { - "program": "ShaderProgramID" - }, - "glProgramUniform3dv": { - "program": "ShaderProgramID" - }, - "glProgramUniform4d": { - "program": "ShaderProgramID" - }, - "glProgramUniform4dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2x3dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix2x4dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3x2dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix3x4dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4x2dv": { - "program": "ShaderProgramID" - }, - "glProgramUniformMatrix4x3dv": { - "program": "ShaderProgramID" - }, - "glGetActiveAtomicCounterBufferiv": { - "program": "ShaderProgramID" - }, - "glShaderStorageBlockBinding": { - "program": "ShaderProgramID" - }, - "glIsFramebuffer": { - "framebuffer": "FramebufferID" - }, - "glBindFramebuffer": { - "framebuffer": "FramebufferID" - }, - "glClearNamedFramebufferfi": { - "framebuffer": "FramebufferID" - }, - "glClearNamedFramebufferfv": { - "framebuffer": "FramebufferID" - }, - "glClearNamedFramebufferiv": { - "framebuffer": "FramebufferID" - }, - "glClearNamedFramebufferuiv": { - "framebuffer": "FramebufferID" - }, - "glCheckNamedFramebufferStatus": { - "framebuffer": "FramebufferID" - }, - "glGetNamedFramebufferAttachmentParameteriv": { - "framebuffer": "FramebufferID" - }, - "glGetNamedFramebufferParameteriv": { - "framebuffer": "FramebufferID" - }, - "glInvalidateNamedFramebufferData": { - "framebuffer": "FramebufferID" - }, - "glInvalidateNamedFramebufferSubData": { - "framebuffer": "FramebufferID" - }, - "glNamedFramebufferDrawBuffer": { - "framebuffer": "FramebufferID" - }, - "glNamedFramebufferDrawBuffers": { - "framebuffer": "FramebufferID" - }, - "glNamedFramebufferParameteri": { - "framebuffer": "FramebufferID" - }, - "glNamedFramebufferReadBuffer": { - "framebuffer": "FramebufferID" - }, - "glGenFramebuffers": { - "framebuffers": "FramebufferID *" - }, - "glDeleteFramebuffers": { - "framebuffers": "const FramebufferID *" - }, - "glGenSemaphores": { - "semaphores": "SemaphoreID *" - }, - "glDeleteSemaphores": { - "semaphores": "const SemaphoreID *" - }, - "glIsSemaphore": { - "semaphore": "SemaphoreID" - }, - "glSemaphoreParameterui64v": { - "semaphore": "SemaphoreID" - }, - "glGetSemaphoreParameterui64v": { - "semaphore": "SemaphoreID" - }, - "glIsMemoryObject": { - "memoryObject": "MemoryObjectID" - }, - "glDeleteMemoryObjects": { - "memoryObjects": "const MemoryObjectID *" - }, - "glCreateMemoryObjects": { - "memoryObjects": "MemoryObjectID *" - }, - "glMemoryObjectParameteriv": { - "memoryObject": "MemoryObjectID" - }, - "glGetMemoryObjectParameteriv": { - "memoryObject": "MemoryObjectID" - }, - "glIsVertexArray": { - "array": "VertexArrayID" - }, - "glGenVertexArrays": { - "arrays": "VertexArrayID *" - }, - "glDeleteVertexArrays": { - "arrays": "const VertexArrayID *" - }, - "glBindVertexArray": { - "array": "VertexArrayID" - }, - "glCreateVertexArrays": { - "arrays": "VertexArrayID *" - }, - "glDisableVertexArrayAttrib": { - "vaobj": "VertexArrayID" - }, - "glEnableVertexArrayAttrib": { - "vaobj": "VertexArrayID" - }, - "glGetVertexArrayIndexediv": { - "vaobj": "VertexArrayID" - }, - "glGetVertexArrayIndexed64iv": { - "vaobj": "VertexArrayID" - }, - "glGetVertexArrayiv": { - "vaobj": "VertexArrayID" - }, - "glVertexArrayAttribBinding": { - "vaobj": "VertexArrayID" - }, - "glVertexArrayAttribFormat": { - "vaobj": "VertexArrayID" - }, - "glVertexArrayAttribIFormat": { - "vaobj": "VertexArrayID" - }, - "glVertexArrayAttribLFormat": { - "vaobj": "VertexArrayID" - }, - "glVertexArrayBindingDivisor": { - "vaobj": "VertexArrayID" } } diff --git a/src/common/PackedEnums.h b/src/common/PackedEnums.h index 1c91c9ff8..afe0c913d 100644 --- a/src/common/PackedEnums.h +++ b/src/common/PackedEnums.h @@ -381,7 +381,7 @@ struct BufferID GLuint value; }; -struct ProgramPipelineID +struct FenceNVID { GLuint value; }; @@ -391,17 +391,22 @@ struct FramebufferID GLuint value; }; -struct SemaphoreID -{ - GLuint value; -}; - struct MemoryObjectID { GLuint value; }; -struct VertexArrayID +struct PathID +{ + GLuint value; +}; + +struct ProgramPipelineID +{ + GLuint value; +}; + +struct QueryID { GLuint value; }; @@ -411,7 +416,12 @@ struct RenderbufferID GLuint value; }; -struct PathID +struct SamplerID +{ + GLuint value; +}; + +struct SemaphoreID { GLuint value; }; @@ -426,17 +436,12 @@ struct TextureID GLuint value; }; -struct SamplerID +struct TransformFeedbackID { GLuint value; }; -struct FenceNVID -{ - GLuint value; -}; - -struct QueryID +struct VertexArrayID { GLuint value; }; diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index 2fa771636..b6346e195 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -455,7 +455,7 @@ void Context::initialize() // In the initial state, a default transform feedback object is bound and treated as // a transform feedback object with a name of zero. That object is bound any time // BindTransformFeedback is called with id of zero - bindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0); + bindTransformFeedback(GL_TRANSFORM_FEEDBACK, {0}); } for (auto type : angle::AllEnums()) @@ -994,7 +994,7 @@ Sampler *Context::getSampler(SamplerID handle) const return mState.mSamplerManager->getSampler(handle); } -TransformFeedback *Context::getTransformFeedback(GLuint handle) const +TransformFeedback *Context::getTransformFeedback(TransformFeedbackID handle) const { return mTransformFeedbackMap.query(handle); } @@ -1019,7 +1019,7 @@ gl::LabeledObject *Context::getLabeledObject(GLenum identifier, GLuint name) con case GL_QUERY: return getQuery({name}); case GL_TRANSFORM_FEEDBACK: - return getTransformFeedback(name); + return getTransformFeedback({name}); case GL_SAMPLER: return getSampler({name}); case GL_TEXTURE: @@ -1178,7 +1178,7 @@ void Context::useProgramStages(ProgramPipelineID pipeline, UNIMPLEMENTED(); } -void Context::bindTransformFeedback(GLenum target, GLuint transformFeedbackHandle) +void Context::bindTransformFeedback(GLenum target, TransformFeedbackID transformFeedbackHandle) { ASSERT(target == GL_TRANSFORM_FEEDBACK); TransformFeedback *transformFeedback = @@ -2763,7 +2763,8 @@ VertexArray *Context::checkVertexArrayAllocation(VertexArrayID vertexArrayHandle return vertexArray; } -TransformFeedback *Context::checkTransformFeedbackAllocation(GLuint transformFeedbackHandle) +TransformFeedback *Context::checkTransformFeedbackAllocation( + TransformFeedbackID transformFeedbackHandle) { // Only called after a prior call to Gen. TransformFeedback *transformFeedback = getTransformFeedback(transformFeedbackHandle); @@ -2784,9 +2785,9 @@ bool Context::isVertexArrayGenerated(VertexArrayID vertexArray) return mVertexArrayMap.contains(vertexArray); } -bool Context::isTransformFeedbackGenerated(GLuint transformFeedback) +bool Context::isTransformFeedbackGenerated(TransformFeedbackID transformFeedback) { - ASSERT(mTransformFeedbackMap.contains(0)); + ASSERT(mTransformFeedbackMap.contains({0})); return mTransformFeedbackMap.contains(transformFeedback); } @@ -2854,7 +2855,7 @@ void Context::detachVertexArray(VertexArrayID vertexArray) } } -void Context::detachTransformFeedback(GLuint transformFeedback) +void Context::detachTransformFeedback(TransformFeedbackID transformFeedback) { // Transform feedback detachment is handled by Context, because 0 is a valid // transform feedback, and a pointer to it must be passed from Context to State at @@ -2865,7 +2866,7 @@ void Context::detachTransformFeedback(GLuint transformFeedback) // VAOs and FBOs and set the current bound transform feedback back to 0. if (mState.removeTransformFeedbackBinding(this, transformFeedback)) { - bindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0); + bindTransformFeedback(GL_TRANSFORM_FEEDBACK, {0}); } } @@ -6842,12 +6843,12 @@ void Context::getTransformFeedbackVarying(ShaderProgramID program, programObject->getTransformFeedbackVarying(index, bufSize, length, size, type, name); } -void Context::deleteTransformFeedbacks(GLsizei n, const GLuint *ids) +void Context::deleteTransformFeedbacks(GLsizei n, const TransformFeedbackID *ids) { for (int i = 0; i < n; i++) { - GLuint transformFeedback = ids[i]; - if (transformFeedback == 0) + TransformFeedbackID transformFeedback = ids[i]; + if (transformFeedback.value == 0) { continue; } @@ -6861,24 +6862,24 @@ void Context::deleteTransformFeedbacks(GLsizei n, const GLuint *ids) transformFeedbackObject->release(this); } - mTransformFeedbackHandleAllocator.release(transformFeedback); + mTransformFeedbackHandleAllocator.release(transformFeedback.value); } } } -void Context::genTransformFeedbacks(GLsizei n, GLuint *ids) +void Context::genTransformFeedbacks(GLsizei n, TransformFeedbackID *ids) { for (int i = 0; i < n; i++) { - GLuint transformFeedback = mTransformFeedbackHandleAllocator.allocate(); + TransformFeedbackID transformFeedback = {mTransformFeedbackHandleAllocator.allocate()}; mTransformFeedbackMap.assign(transformFeedback, nullptr); ids[i] = transformFeedback; } } -GLboolean Context::isTransformFeedback(GLuint id) +GLboolean Context::isTransformFeedback(TransformFeedbackID id) { - if (id == 0) + if (id.value == 0) { // The 3.0.4 spec [section 6.1.11] states that if ID is zero, IsTransformFeedback // returns FALSE diff --git a/src/libANGLE/Context.h b/src/libANGLE/Context.h index ecbd563bd..22aba6057 100644 --- a/src/libANGLE/Context.h +++ b/src/libANGLE/Context.h @@ -385,7 +385,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl Sampler *getSampler(SamplerID handle) const; Query *getQuery(QueryID handle, bool create, QueryType type); Query *getQuery(QueryID handle) const; - TransformFeedback *getTransformFeedback(GLuint handle) const; + TransformFeedback *getTransformFeedback(TransformFeedbackID handle) const; ProgramPipeline *getProgramPipeline(ProgramPipelineID handle) const; MemoryObject *getMemoryObject(MemoryObjectID handle) const; Semaphore *getSemaphore(SemaphoreID handle) const; @@ -397,7 +397,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl Compiler *getCompiler() const; bool isVertexArrayGenerated(VertexArrayID vertexArray); - bool isTransformFeedbackGenerated(GLuint vertexArray); + bool isTransformFeedbackGenerated(TransformFeedbackID transformFeedback); void getBooleanvImpl(GLenum pname, GLboolean *params); void getFloatvImpl(GLenum pname, GLfloat *params); @@ -591,7 +591,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl angle::Result syncStateForPathOperation(); VertexArray *checkVertexArrayAllocation(VertexArrayID vertexArrayHandle); - TransformFeedback *checkTransformFeedbackAllocation(GLuint transformFeedback); + TransformFeedback *checkTransformFeedbackAllocation(TransformFeedbackID transformFeedback); angle::Result onProgramLink(Program *programObject); @@ -600,7 +600,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl void detachFramebuffer(FramebufferID framebuffer); void detachRenderbuffer(RenderbufferID renderbuffer); void detachVertexArray(VertexArrayID vertexArray); - void detachTransformFeedback(GLuint transformFeedback); + void detachTransformFeedback(TransformFeedbackID transformFeedback); void detachSampler(SamplerID sampler); void detachProgramPipeline(ProgramPipelineID pipeline); @@ -658,7 +658,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl ResourceMap mVertexArrayMap; HandleAllocator mVertexArrayHandleAllocator; - ResourceMap mTransformFeedbackMap; + ResourceMap mTransformFeedbackMap; HandleAllocator mTransformFeedbackHandleAllocator; const char *mVersionString; diff --git a/src/libANGLE/Context_gl.cpp b/src/libANGLE/Context_gl.cpp index 654f79168..d980a5c59 100644 --- a/src/libANGLE/Context_gl.cpp +++ b/src/libANGLE/Context_gl.cpp @@ -2292,12 +2292,12 @@ void Context::blendFunci(GLuint buf, GLenum src, GLenum dst) UNIMPLEMENTED(); } -void Context::drawTransformFeedback(GLenum mode, GLuint id) +void Context::drawTransformFeedback(GLenum mode, TransformFeedbackID id) { UNIMPLEMENTED(); } -void Context::drawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream) +void Context::drawTransformFeedbackStream(GLenum mode, TransformFeedbackID id, GLuint stream) { UNIMPLEMENTED(); } @@ -2761,13 +2761,15 @@ void Context::drawElementsInstancedBaseInstance(GLenum mode, UNIMPLEMENTED(); } -void Context::drawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount) +void Context::drawTransformFeedbackInstanced(GLenum mode, + TransformFeedbackID id, + GLsizei instancecount) { UNIMPLEMENTED(); } void Context::drawTransformFeedbackStreamInstanced(GLenum mode, - GLuint id, + TransformFeedbackID id, GLuint stream, GLsizei instancecount) { diff --git a/src/libANGLE/Context_gl_4_0_autogen.h b/src/libANGLE/Context_gl_4_0_autogen.h index 9d92cf7f7..3225c28c8 100644 --- a/src/libANGLE/Context_gl_4_0_autogen.h +++ b/src/libANGLE/Context_gl_4_0_autogen.h @@ -17,8 +17,8 @@ void blendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, \ GLenum dstAlpha); \ void blendFunci(GLuint buf, GLenum src, GLenum dst); \ - void drawTransformFeedback(GLenum mode, GLuint id); \ - void drawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream); \ + void drawTransformFeedback(GLenum mode, TransformFeedbackID idPacked); \ + void drawTransformFeedbackStream(GLenum mode, TransformFeedbackID idPacked, GLuint stream); \ void endQueryIndexed(GLenum target, GLuint index); \ void getActiveSubroutineName(ShaderProgramID programPacked, GLenum shadertype, GLuint index, \ GLsizei bufsize, GLsizei *length, GLchar *name); \ diff --git a/src/libANGLE/Context_gl_4_2_autogen.h b/src/libANGLE/Context_gl_4_2_autogen.h index 9a2490aa8..95dd61d5e 100644 --- a/src/libANGLE/Context_gl_4_2_autogen.h +++ b/src/libANGLE/Context_gl_4_2_autogen.h @@ -14,9 +14,10 @@ void drawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, \ const void *indices, GLsizei instancecount, \ GLuint baseinstance); \ - void drawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount); \ - void drawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, \ - GLsizei instancecount); \ + void drawTransformFeedbackInstanced(GLenum mode, TransformFeedbackID idPacked, \ + GLsizei instancecount); \ + void drawTransformFeedbackStreamInstanced(GLenum mode, TransformFeedbackID idPacked, \ + GLuint stream, GLsizei instancecount); \ void getActiveAtomicCounterBufferiv(ShaderProgramID programPacked, GLuint bufferIndex, \ GLenum pname, GLint *params); diff --git a/src/libANGLE/Context_gles_3_0_autogen.h b/src/libANGLE/Context_gles_3_0_autogen.h index c8836b915..cf7114744 100644 --- a/src/libANGLE/Context_gles_3_0_autogen.h +++ b/src/libANGLE/Context_gles_3_0_autogen.h @@ -17,7 +17,7 @@ void bindBufferRange(BufferBinding targetPacked, GLuint index, BufferID bufferPacked, \ GLintptr offset, GLsizeiptr size); \ void bindSampler(GLuint unit, SamplerID samplerPacked); \ - void bindTransformFeedback(GLenum target, GLuint id); \ + void bindTransformFeedback(GLenum target, TransformFeedbackID idPacked); \ void bindVertexArray(VertexArrayID arrayPacked); \ void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, \ GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); \ @@ -40,7 +40,7 @@ void deleteQueries(GLsizei n, const QueryID *idsPacked); \ void deleteSamplers(GLsizei count, const SamplerID *samplersPacked); \ void deleteSync(GLsync sync); \ - void deleteTransformFeedbacks(GLsizei n, const GLuint *ids); \ + void deleteTransformFeedbacks(GLsizei n, const TransformFeedbackID *idsPacked); \ void deleteVertexArrays(GLsizei n, const VertexArrayID *arraysPacked); \ void drawArraysInstanced(PrimitiveMode modePacked, GLint first, GLsizei count, \ GLsizei instancecount); \ @@ -58,7 +58,7 @@ GLint level, GLint layer); \ void genQueries(GLsizei n, QueryID *idsPacked); \ void genSamplers(GLsizei count, SamplerID *samplersPacked); \ - void genTransformFeedbacks(GLsizei n, GLuint *ids); \ + void genTransformFeedbacks(GLsizei n, TransformFeedbackID *idsPacked); \ void genVertexArrays(GLsizei n, VertexArrayID *arraysPacked); \ void getActiveUniformBlockName(ShaderProgramID programPacked, GLuint uniformBlockIndex, \ GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); \ @@ -97,7 +97,7 @@ GLboolean isQuery(QueryID idPacked); \ GLboolean isSampler(SamplerID samplerPacked); \ GLboolean isSync(GLsync sync); \ - GLboolean isTransformFeedback(GLuint id); \ + GLboolean isTransformFeedback(TransformFeedbackID idPacked); \ GLboolean isVertexArray(VertexArrayID arrayPacked); \ void *mapBufferRange(BufferBinding targetPacked, GLintptr offset, GLsizeiptr length, \ GLbitfield access); \ diff --git a/src/libANGLE/FrameCapture.cpp b/src/libANGLE/FrameCapture.cpp index 3b85727df..8de9d4142 100644 --- a/src/libANGLE/FrameCapture.cpp +++ b/src/libANGLE/FrameCapture.cpp @@ -854,17 +854,15 @@ template <> void WriteParamValueToStream(std::ostream &os, GLDEBUGPROC value) {} -// TODO(jmadill): Use buffer ID map. http://anglebug.com/3611 +// TODO(jmadill): Use resource ID map. http://anglebug.com/3611 template <> void WriteParamValueToStream(std::ostream &os, gl::BufferID value) { os << value.value; } -// TODO(jmadill): Use program pipeline ID map. http://anglebug.com/3611 template <> -void WriteParamValueToStream(std::ostream &os, - gl::ProgramPipelineID value) +void WriteParamValueToStream(std::ostream &os, gl::FenceNVID value) { os << value.value; } @@ -875,12 +873,6 @@ void WriteParamValueToStream(std::ostream &os, gl::Fr os << value.value; } -template <> -void WriteParamValueToStream(std::ostream &os, gl::SemaphoreID value) -{ - os << value.value; -} - template <> void WriteParamValueToStream(std::ostream &os, gl::MemoryObjectID value) { @@ -888,38 +880,42 @@ void WriteParamValueToStream(std::ostream &os, gl::M } template <> -void WriteParamValueToStream(std::ostream &os, gl::VertexArrayID value) +void WriteParamValueToStream(std::ostream &os, gl::PathID value) +{ + os << value.value; +} + +template <> +void WriteParamValueToStream(std::ostream &os, + gl::ProgramPipelineID value) +{ + os << value.value; +} + +template <> +void WriteParamValueToStream(std::ostream &os, gl::QueryID value) { os << value.value; } template <> void WriteParamValueToStream(std::ostream &os, gl::RenderbufferID value) -{ - os << "gRenderbufferMap[" << value.value << "]"; -} - -// TODO(jmadill): Use path ID map. http://anglebug.com/3611 -template <> -void WriteParamValueToStream(std::ostream &os, gl::PathID value) { os << value.value; } -// TODO(jmadill): Use texture ID map. http://anglebug.com/3611 -template <> -void WriteParamValueToStream(std::ostream &os, gl::TextureID value) -{ - os << value.value; -} - -// TODO(jmadill): Use sampler ID map. http://anglebug.com/3611 template <> void WriteParamValueToStream(std::ostream &os, gl::SamplerID value) { os << value.value; } +template <> +void WriteParamValueToStream(std::ostream &os, gl::SemaphoreID value) +{ + os << value.value; +} + template <> void WriteParamValueToStream(std::ostream &os, gl::ShaderProgramID value) @@ -927,16 +923,21 @@ void WriteParamValueToStream(std::ostream &os, os << value.value; } -// TODO(jmadill): Use FenceNV ID map. http://anglebug.com/3611 template <> -void WriteParamValueToStream(std::ostream &os, gl::FenceNVID value) +void WriteParamValueToStream(std::ostream &os, gl::TextureID value) { os << value.value; } -// TODO(jmadill): Use query ID map. http://anglebug.com/3611 template <> -void WriteParamValueToStream(std::ostream &os, gl::QueryID value) +void WriteParamValueToStream(std::ostream &os, + gl::TransformFeedbackID value) +{ + os << value.value; +} + +template <> +void WriteParamValueToStream(std::ostream &os, gl::VertexArrayID value) { os << value.value; } diff --git a/src/libANGLE/FrameCapture.h b/src/libANGLE/FrameCapture.h index f1a34a520..2ac7b6c61 100644 --- a/src/libANGLE/FrameCapture.h +++ b/src/libANGLE/FrameCapture.h @@ -262,45 +262,49 @@ void WriteParamValueToStream(std::ostream &os, GLDEBUGP template <> void WriteParamValueToStream(std::ostream &os, gl::BufferID value); +template <> +void WriteParamValueToStream(std::ostream &os, gl::FenceNVID value); + template <> void WriteParamValueToStream(std::ostream &os, gl::FramebufferID value); -template <> -void WriteParamValueToStream(std::ostream &os, - gl::ProgramPipelineID value); - -template <> -void WriteParamValueToStream(std::ostream &os, - gl::ShaderProgramID value); - -template <> -void WriteParamValueToStream(std::ostream &os, gl::SemaphoreID value); - template <> void WriteParamValueToStream(std::ostream &os, gl::MemoryObjectID value); template <> -void WriteParamValueToStream(std::ostream &os, gl::VertexArrayID value); +void WriteParamValueToStream(std::ostream &os, gl::PathID value); + +template <> +void WriteParamValueToStream(std::ostream &os, + gl::ProgramPipelineID value); + +template <> +void WriteParamValueToStream(std::ostream &os, gl::QueryID value); template <> void WriteParamValueToStream(std::ostream &os, gl::RenderbufferID value); template <> -void WriteParamValueToStream(std::ostream &os, gl::PathID value); +void WriteParamValueToStream(std::ostream &os, gl::SamplerID value); + +template <> +void WriteParamValueToStream(std::ostream &os, gl::SemaphoreID value); + +template <> +void WriteParamValueToStream(std::ostream &os, + gl::ShaderProgramID value); template <> void WriteParamValueToStream(std::ostream &os, gl::TextureID value); template <> -void WriteParamValueToStream(std::ostream &os, gl::SamplerID value); +void WriteParamValueToStream(std::ostream &os, + gl::TransformFeedbackID value); template <> -void WriteParamValueToStream(std::ostream &os, gl::FenceNVID value); - -template <> -void WriteParamValueToStream(std::ostream &os, gl::QueryID value); +void WriteParamValueToStream(std::ostream &os, gl::VertexArrayID value); // General fallback for any unspecific type. template diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp index 343aa580c..b15fcfc3f 100644 --- a/src/libANGLE/State.cpp +++ b/src/libANGLE/State.cpp @@ -1487,9 +1487,10 @@ void State::setTransformFeedbackBinding(const Context *context, mDirtyBits.set(DIRTY_BIT_TRANSFORM_FEEDBACK_BINDING); } -bool State::removeTransformFeedbackBinding(const Context *context, GLuint transformFeedback) +bool State::removeTransformFeedbackBinding(const Context *context, + TransformFeedbackID transformFeedback) { - if (mTransformFeedback.id() == transformFeedback) + if (mTransformFeedback.id() == transformFeedback.value) { if (mTransformFeedback.get()) mTransformFeedback->onBindingChanged(context, false); diff --git a/src/libANGLE/State.h b/src/libANGLE/State.h index 3f818c12d..4f99382ff 100644 --- a/src/libANGLE/State.h +++ b/src/libANGLE/State.h @@ -316,7 +316,8 @@ class State : angle::NonCopyable !curTransformFeedback->isPaused(); } - bool removeTransformFeedbackBinding(const Context *context, GLuint transformFeedback); + bool removeTransformFeedbackBinding(const Context *context, + TransformFeedbackID transformFeedback); // Query binding manipulation bool isQueryActive(QueryType type) const; diff --git a/src/libANGLE/TransformFeedback.cpp b/src/libANGLE/TransformFeedback.cpp index 7e9bb4308..5af2309fd 100644 --- a/src/libANGLE/TransformFeedback.cpp +++ b/src/libANGLE/TransformFeedback.cpp @@ -84,8 +84,10 @@ GLsizeiptr TransformFeedbackState::getPrimitivesDrawn() const } } -TransformFeedback::TransformFeedback(rx::GLImplFactory *implFactory, GLuint id, const Caps &caps) - : RefCountObject(id), +TransformFeedback::TransformFeedback(rx::GLImplFactory *implFactory, + TransformFeedbackID id, + const Caps &caps) + : RefCountObject(id.value), mState(caps.maxTransformFeedbackSeparateAttributes), mImplementation(implFactory->createTransformFeedback(mState)) { diff --git a/src/libANGLE/TransformFeedback.h b/src/libANGLE/TransformFeedback.h index 36ea2ab6f..aa01b43bc 100644 --- a/src/libANGLE/TransformFeedback.h +++ b/src/libANGLE/TransformFeedback.h @@ -60,7 +60,7 @@ class TransformFeedbackState final : angle::NonCopyable class TransformFeedback final : public RefCountObject, public LabeledObject { public: - TransformFeedback(rx::GLImplFactory *implFactory, GLuint id, const Caps &caps); + TransformFeedback(rx::GLImplFactory *implFactory, TransformFeedbackID id, const Caps &caps); ~TransformFeedback() override; void onDestroy(const Context *context) override; diff --git a/src/libANGLE/TransformFeedback_unittest.cpp b/src/libANGLE/TransformFeedback_unittest.cpp index 38f339e7e..17e0aef67 100644 --- a/src/libANGLE/TransformFeedback_unittest.cpp +++ b/src/libANGLE/TransformFeedback_unittest.cpp @@ -41,7 +41,7 @@ class TransformFeedbackTest : public testing::Test // Set a reasonable number of tf attributes mCaps.maxTransformFeedbackSeparateAttributes = 8; - mFeedback = new gl::TransformFeedback(&mMockFactory, 1, mCaps); + mFeedback = new gl::TransformFeedback(&mMockFactory, gl::TransformFeedbackID{1}, mCaps); mFeedback->addRef(); mImpl = rx::GetImplAs(mFeedback); diff --git a/src/libANGLE/capture_gles_3_0_autogen.cpp b/src/libANGLE/capture_gles_3_0_autogen.cpp index 79676598b..7e4f55fa9 100644 --- a/src/libANGLE/capture_gles_3_0_autogen.cpp +++ b/src/libANGLE/capture_gles_3_0_autogen.cpp @@ -95,13 +95,13 @@ CallCapture CaptureBindSampler(const Context *context, CallCapture CaptureBindTransformFeedback(const Context *context, bool isCallValid, GLenum target, - GLuint id) + TransformFeedbackID idPacked) { ParamBuffer paramBuffer; paramBuffer.addEnumParam("target", GLenumGroup::BindTransformFeedbackTarget, ParamType::TGLenum, target); - paramBuffer.addValueParam("id", ParamType::TGLuint, id); + paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked); return CallCapture(gl::EntryPoint::BindTransformFeedback, std::move(paramBuffer)); } @@ -404,16 +404,16 @@ CallCapture CaptureDeleteSync(const Context *context, bool isCallValid, GLsync s CallCapture CaptureDeleteTransformFeedbacks(const Context *context, bool isCallValid, GLsizei n, - const GLuint *ids) + const TransformFeedbackID *idsPacked) { ParamBuffer paramBuffer; paramBuffer.addValueParam("n", ParamType::TGLsizei, n); - ParamCapture idsParam("ids", ParamType::TGLuintConstPointer); - InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value); - CaptureDeleteTransformFeedbacks_ids(context, isCallValid, n, ids, &idsParam); - paramBuffer.addParam(std::move(idsParam)); + ParamCapture idsPackedParam("idsPacked", ParamType::TTransformFeedbackIDConstPointer); + InitParamValue(ParamType::TTransformFeedbackIDConstPointer, idsPacked, &idsPackedParam.value); + CaptureDeleteTransformFeedbacks_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam); + paramBuffer.addParam(std::move(idsPackedParam)); return CallCapture(gl::EntryPoint::DeleteTransformFeedbacks, std::move(paramBuffer)); } @@ -629,16 +629,16 @@ CallCapture CaptureGenSamplers(const Context *context, CallCapture CaptureGenTransformFeedbacks(const Context *context, bool isCallValid, GLsizei n, - GLuint *ids) + TransformFeedbackID *idsPacked) { ParamBuffer paramBuffer; paramBuffer.addValueParam("n", ParamType::TGLsizei, n); - ParamCapture idsParam("ids", ParamType::TGLuintPointer); - InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value); - CaptureGenTransformFeedbacks_ids(context, isCallValid, n, ids, &idsParam); - paramBuffer.addParam(std::move(idsParam)); + ParamCapture idsPackedParam("idsPacked", ParamType::TTransformFeedbackIDPointer); + InitParamValue(ParamType::TTransformFeedbackIDPointer, idsPacked, &idsPackedParam.value); + CaptureGenTransformFeedbacks_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam); + paramBuffer.addParam(std::move(idsPackedParam)); return CallCapture(gl::EntryPoint::GenTransformFeedbacks, std::move(paramBuffer)); } @@ -1295,12 +1295,12 @@ CallCapture CaptureIsSync(const Context *context, CallCapture CaptureIsTransformFeedback(const Context *context, bool isCallValid, - GLuint id, + TransformFeedbackID idPacked, GLboolean returnValue) { ParamBuffer paramBuffer; - paramBuffer.addValueParam("id", ParamType::TGLuint, id); + paramBuffer.addValueParam("idPacked", ParamType::TTransformFeedbackID, idPacked); ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean); InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value); diff --git a/src/libANGLE/capture_gles_3_0_autogen.h b/src/libANGLE/capture_gles_3_0_autogen.h index bc6ec5d9b..1a97bebb8 100644 --- a/src/libANGLE/capture_gles_3_0_autogen.h +++ b/src/libANGLE/capture_gles_3_0_autogen.h @@ -46,7 +46,7 @@ angle::CallCapture CaptureBindSampler(const Context *context, angle::CallCapture CaptureBindTransformFeedback(const Context *context, bool isCallValid, GLenum target, - GLuint id); + TransformFeedbackID idPacked); angle::CallCapture CaptureBindVertexArray(const Context *context, bool isCallValid, VertexArrayID arrayPacked); @@ -143,7 +143,7 @@ angle::CallCapture CaptureDeleteSync(const Context *context, bool isCallValid, G angle::CallCapture CaptureDeleteTransformFeedbacks(const Context *context, bool isCallValid, GLsizei n, - const GLuint *ids); + const TransformFeedbackID *idsPacked); angle::CallCapture CaptureDeleteVertexArrays(const Context *context, bool isCallValid, GLsizei n, @@ -205,7 +205,7 @@ angle::CallCapture CaptureGenSamplers(const Context *context, angle::CallCapture CaptureGenTransformFeedbacks(const Context *context, bool isCallValid, GLsizei n, - GLuint *ids); + TransformFeedbackID *idsPacked); angle::CallCapture CaptureGenVertexArrays(const Context *context, bool isCallValid, GLsizei n, @@ -368,7 +368,7 @@ angle::CallCapture CaptureIsSync(const Context *context, GLboolean returnValue); angle::CallCapture CaptureIsTransformFeedback(const Context *context, bool isCallValid, - GLuint id, + TransformFeedbackID idPacked, GLboolean returnValue); angle::CallCapture CaptureIsVertexArray(const Context *context, bool isCallValid, @@ -650,11 +650,11 @@ void CaptureDeleteSamplers_samplersPacked(const Context *context, GLsizei count, const SamplerID *samplersPacked, angle::ParamCapture *paramCapture); -void CaptureDeleteTransformFeedbacks_ids(const Context *context, - bool isCallValid, - GLsizei n, - const GLuint *ids, - angle::ParamCapture *paramCapture); +void CaptureDeleteTransformFeedbacks_idsPacked(const Context *context, + bool isCallValid, + GLsizei n, + const TransformFeedbackID *idsPacked, + angle::ParamCapture *paramCapture); void CaptureDeleteVertexArrays_arraysPacked(const Context *context, bool isCallValid, GLsizei n, @@ -692,11 +692,11 @@ void CaptureGenSamplers_samplersPacked(const Context *context, GLsizei count, SamplerID *samplersPacked, angle::ParamCapture *paramCapture); -void CaptureGenTransformFeedbacks_ids(const Context *context, - bool isCallValid, - GLsizei n, - GLuint *ids, - angle::ParamCapture *paramCapture); +void CaptureGenTransformFeedbacks_idsPacked(const Context *context, + bool isCallValid, + GLsizei n, + TransformFeedbackID *idsPacked, + angle::ParamCapture *paramCapture); void CaptureGenVertexArrays_arraysPacked(const Context *context, bool isCallValid, GLsizei n, diff --git a/src/libANGLE/capture_gles_3_0_params.cpp b/src/libANGLE/capture_gles_3_0_params.cpp index 3aa1e9cd3..24f33ebb8 100644 --- a/src/libANGLE/capture_gles_3_0_params.cpp +++ b/src/libANGLE/capture_gles_3_0_params.cpp @@ -94,11 +94,11 @@ void CaptureDeleteSamplers_samplersPacked(const Context *context, UNIMPLEMENTED(); } -void CaptureDeleteTransformFeedbacks_ids(const Context *context, - bool isCallValid, - GLsizei n, - const GLuint *ids, - ParamCapture *paramCapture) +void CaptureDeleteTransformFeedbacks_idsPacked(const Context *context, + bool isCallValid, + GLsizei n, + const TransformFeedbackID *ids, + ParamCapture *paramCapture) { UNIMPLEMENTED(); } @@ -164,11 +164,11 @@ void CaptureGenSamplers_samplersPacked(const Context *context, UNIMPLEMENTED(); } -void CaptureGenTransformFeedbacks_ids(const Context *context, - bool isCallValid, - GLsizei n, - GLuint *ids, - ParamCapture *paramCapture) +void CaptureGenTransformFeedbacks_idsPacked(const Context *context, + bool isCallValid, + GLsizei n, + TransformFeedbackID *ids, + ParamCapture *paramCapture) { UNIMPLEMENTED(); } diff --git a/src/libANGLE/frame_capture_replay_autogen.cpp b/src/libANGLE/frame_capture_replay_autogen.cpp index 19a7a6534..ea2641036 100644 --- a/src/libANGLE/frame_capture_replay_autogen.cpp +++ b/src/libANGLE/frame_capture_replay_autogen.cpp @@ -151,7 +151,8 @@ void FrameCapture::ReplayCall(gl::Context *context, case gl::EntryPoint::BindTransformFeedback: context->bindTransformFeedback( params.getParam("target", ParamType::TGLenum, 0).value.GLenumVal, - params.getParam("id", ParamType::TGLuint, 1).value.GLuintVal); + params.getParam("idPacked", ParamType::TTransformFeedbackID, 1) + .value.TransformFeedbackIDVal); break; case gl::EntryPoint::BindVertexArray: context->bindVertexArray(params.getParam("arrayPacked", ParamType::TVertexArrayID, 0) @@ -544,8 +545,8 @@ void FrameCapture::ReplayCall(gl::Context *context, case gl::EntryPoint::DeleteTransformFeedbacks: context->deleteTransformFeedbacks( params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal, - replayContext->getAsConstPointer( - params.getParam("ids", ParamType::TGLuintConstPointer, 1))); + replayContext->getAsConstPointer( + params.getParam("idsPacked", ParamType::TTransformFeedbackIDConstPointer, 1))); break; case gl::EntryPoint::DeleteVertexArrays: context->deleteVertexArrays( @@ -850,8 +851,8 @@ void FrameCapture::ReplayCall(gl::Context *context, case gl::EntryPoint::GenTransformFeedbacks: context->genTransformFeedbacks( params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal, - replayContext->getReadBufferPointer( - params.getParam("ids", ParamType::TGLuintPointer, 1))); + replayContext->getReadBufferPointer( + params.getParam("idsPacked", ParamType::TTransformFeedbackIDPointer, 1))); break; case gl::EntryPoint::GenVertexArrays: context->genVertexArrays( @@ -1650,7 +1651,8 @@ void FrameCapture::ReplayCall(gl::Context *context, break; case gl::EntryPoint::IsTransformFeedback: context->isTransformFeedback( - params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal); + params.getParam("idPacked", ParamType::TTransformFeedbackID, 0) + .value.TransformFeedbackIDVal); break; case gl::EntryPoint::IsVertexArray: context->isVertexArray(params.getParam("arrayPacked", ParamType::TVertexArrayID, 0) diff --git a/src/libANGLE/frame_capture_utils_autogen.cpp b/src/libANGLE/frame_capture_utils_autogen.cpp index 6b8588e85..a653faff7 100644 --- a/src/libANGLE/frame_capture_utils_autogen.cpp +++ b/src/libANGLE/frame_capture_utils_autogen.cpp @@ -394,6 +394,18 @@ void WriteParamTypeToStream(std::ostream &os, ParamType paramType, const ParamVa case ParamType::TTextureType: WriteParamValueToStream(os, paramValue.TextureTypeVal); break; + case ParamType::TTransformFeedbackID: + WriteParamValueToStream( + os, paramValue.TransformFeedbackIDVal); + break; + case ParamType::TTransformFeedbackIDConstPointer: + WriteParamValueToStream( + os, paramValue.TransformFeedbackIDConstPointerVal); + break; + case ParamType::TTransformFeedbackIDPointer: + WriteParamValueToStream( + os, paramValue.TransformFeedbackIDPointerVal); + break; case ParamType::TVertexArrayID: WriteParamValueToStream(os, paramValue.VertexArrayIDVal); break; @@ -652,6 +664,12 @@ const char *ParamTypeToString(ParamType paramType) return "GLenum"; case ParamType::TTextureType: return "GLenum"; + case ParamType::TTransformFeedbackID: + return "GLuint"; + case ParamType::TTransformFeedbackIDConstPointer: + return "const GLuint *"; + case ParamType::TTransformFeedbackIDPointer: + return "GLuint *"; case ParamType::TVertexArrayID: return "GLuint"; case ParamType::TVertexArrayIDConstPointer: diff --git a/src/libANGLE/frame_capture_utils_autogen.h b/src/libANGLE/frame_capture_utils_autogen.h index aca1d7a0d..ce3cce0c1 100644 --- a/src/libANGLE/frame_capture_utils_autogen.h +++ b/src/libANGLE/frame_capture_utils_autogen.h @@ -126,6 +126,9 @@ enum class ParamType TTextureIDPointer, TTextureTarget, TTextureType, + TTransformFeedbackID, + TTransformFeedbackIDConstPointer, + TTransformFeedbackIDPointer, TVertexArrayID, TVertexArrayIDConstPointer, TVertexArrayIDPointer, @@ -247,6 +250,9 @@ union ParamValue gl::TextureID *TextureIDPointerVal; gl::TextureTarget TextureTargetVal; gl::TextureType TextureTypeVal; + gl::TransformFeedbackID TransformFeedbackIDVal; + const gl::TransformFeedbackID *TransformFeedbackIDConstPointerVal; + gl::TransformFeedbackID *TransformFeedbackIDPointerVal; gl::VertexArrayID VertexArrayIDVal; const gl::VertexArrayID *VertexArrayIDConstPointerVal; gl::VertexArrayID *VertexArrayIDPointerVal; @@ -981,6 +987,28 @@ inline gl::TextureType GetParamVal( return value.TextureTypeVal; } +template <> +inline gl::TransformFeedbackID +GetParamVal(const ParamValue &value) +{ + return value.TransformFeedbackIDVal; +} + +template <> +inline const gl::TransformFeedbackID * +GetParamVal( + const ParamValue &value) +{ + return value.TransformFeedbackIDConstPointerVal; +} + +template <> +inline gl::TransformFeedbackID *GetParamVal(const ParamValue &value) +{ + return value.TransformFeedbackIDPointerVal; +} + template <> inline gl::VertexArrayID GetParamVal( const ParamValue &value) @@ -1264,6 +1292,12 @@ T AccessParamValue(ParamType paramType, const ParamValue &value) return GetParamVal(value); case ParamType::TTextureType: return GetParamVal(value); + case ParamType::TTransformFeedbackID: + return GetParamVal(value); + case ParamType::TTransformFeedbackIDConstPointer: + return GetParamVal(value); + case ParamType::TTransformFeedbackIDPointer: + return GetParamVal(value); case ParamType::TVertexArrayID: return GetParamVal(value); case ParamType::TVertexArrayIDConstPointer: @@ -1986,6 +2020,28 @@ inline void SetParamVal(gl::TextureType valueIn, ParamV valueOut->TextureTypeVal = valueIn; } +template <> +inline void SetParamVal(gl::TransformFeedbackID valueIn, + ParamValue *valueOut) +{ + valueOut->TransformFeedbackIDVal = valueIn; +} + +template <> +inline void SetParamVal( + const gl::TransformFeedbackID *valueIn, + ParamValue *valueOut) +{ + valueOut->TransformFeedbackIDConstPointerVal = valueIn; +} + +template <> +inline void SetParamVal(gl::TransformFeedbackID *valueIn, + ParamValue *valueOut) +{ + valueOut->TransformFeedbackIDPointerVal = valueIn; +} + template <> inline void SetParamVal(gl::VertexArrayID valueIn, ParamValue *valueOut) { @@ -2376,6 +2432,15 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut) case ParamType::TTextureType: SetParamVal(valueIn, valueOut); break; + case ParamType::TTransformFeedbackID: + SetParamVal(valueIn, valueOut); + break; + case ParamType::TTransformFeedbackIDConstPointer: + SetParamVal(valueIn, valueOut); + break; + case ParamType::TTransformFeedbackIDPointer: + SetParamVal(valueIn, valueOut); + break; case ParamType::TVertexArrayID: SetParamVal(valueIn, valueOut); break; diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm index cc4162cfe..e818efd4f 100644 --- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm +++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm @@ -37,125 +37,125 @@ - (id)initWithSharedState:(rx::SharedSwapState *)swapState withContext:(CGLContextObj)displayContext withFunctions:(const rx::FunctionsGL *)functions +{ + self = [super init]; + if (self != nil) { - self = [super init]; - if (self != nil) + self.asynchronous = YES; + mDisplayContext = displayContext; + + initialized = false; + mSwapState = swapState; + mFunctions = functions; + + [self setFrame:CGRectMake(0, 0, mSwapState->textures[0].width, + mSwapState->textures[0].height)]; + } + return self; +} + +- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask +{ + CGLPixelFormatAttribute attribs[] = { + kCGLPFADisplayMask, static_cast(mask), kCGLPFAOpenGLProfile, + static_cast(kCGLOGLPVersion_3_2_Core), + static_cast(0)}; + + CGLPixelFormatObj pixelFormat = nullptr; + GLint numFormats = 0; + CGLChoosePixelFormat(attribs, &pixelFormat, &numFormats); + + return pixelFormat; +} + +- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat +{ + CGLContextObj context = nullptr; + CGLCreateContext(pixelFormat, mDisplayContext, &context); + return context; +} + +- (BOOL)canDrawInCGLContext:(CGLContextObj)glContext + pixelFormat:(CGLPixelFormatObj)pixelFormat + forLayerTime:(CFTimeInterval)timeInterval + displayTime:(const CVTimeStamp *)timeStamp +{ + BOOL result = NO; + + pthread_mutex_lock(&mSwapState->mutex); + { + if (mSwapState->lastRendered->swapId > mSwapState->beingPresented->swapId) { - self.asynchronous = YES; - mDisplayContext = displayContext; - - initialized = false; - mSwapState = swapState; - mFunctions = functions; - - [self setFrame:CGRectMake(0, 0, mSwapState->textures[0].width, - mSwapState->textures[0].height)]; + std::swap(mSwapState->lastRendered, mSwapState->beingPresented); + result = YES; } - return self; + } + pthread_mutex_unlock(&mSwapState->mutex); + + return result; +} + +- (void)drawInCGLContext:(CGLContextObj)glContext + pixelFormat:(CGLPixelFormatObj)pixelFormat + forLayerTime:(CFTimeInterval)timeInterval + displayTime:(const CVTimeStamp *)timeStamp +{ + CGLSetCurrentContext(glContext); + if (!initialized) + { + initialized = true; + + mFunctions->genFramebuffers(1, &mReadFramebuffer); } - - (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask + const auto &texture = *mSwapState->beingPresented; + if ([self frame].size.width != texture.width || [self frame].size.height != texture.height) { - CGLPixelFormatAttribute attribs[] = { - kCGLPFADisplayMask, static_cast(mask), kCGLPFAOpenGLProfile, - static_cast(kCGLOGLPVersion_3_2_Core), - static_cast(0)}; + [self setFrame:CGRectMake(0, 0, texture.width, texture.height)]; - CGLPixelFormatObj pixelFormat = nullptr; - GLint numFormats = 0; - CGLChoosePixelFormat(attribs, &pixelFormat, &numFormats); - - return pixelFormat; + // Without this, the OSX compositor / window system doesn't see the resize. + [self setNeedsDisplay]; } - - (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat - { - CGLContextObj context = nullptr; - CGLCreateContext(pixelFormat, mDisplayContext, &context); - return context; - } + // TODO(cwallez) support 2.1 contexts too that don't have blitFramebuffer nor the + // GL_DRAW_FRAMEBUFFER_BINDING query + GLint drawFBO; + mFunctions->getIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFBO); - - (BOOL)canDrawInCGLContext:(CGLContextObj)glContext - pixelFormat:(CGLPixelFormatObj)pixelFormat - forLayerTime:(CFTimeInterval)timeInterval - displayTime:(const CVTimeStamp *)timeStamp - { - BOOL result = NO; + mFunctions->bindFramebuffer(GL_FRAMEBUFFER, mReadFramebuffer); + mFunctions->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, + texture.texture, 0); - pthread_mutex_lock(&mSwapState->mutex); - { - if (mSwapState->lastRendered->swapId > mSwapState->beingPresented->swapId) - { - std::swap(mSwapState->lastRendered, mSwapState->beingPresented); - result = YES; - } - } - pthread_mutex_unlock(&mSwapState->mutex); + mFunctions->bindFramebuffer(GL_READ_FRAMEBUFFER, mReadFramebuffer); + mFunctions->bindFramebuffer(GL_DRAW_FRAMEBUFFER, drawFBO); + mFunctions->blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, + texture.height, GL_COLOR_BUFFER_BIT, GL_NEAREST); - return result; - } + // Call the super method to flush the context + [super drawInCGLContext:glContext + pixelFormat:pixelFormat + forLayerTime:timeInterval + displayTime:timeStamp]; +} +@end - - (void)drawInCGLContext:(CGLContextObj)glContext - pixelFormat:(CGLPixelFormatObj)pixelFormat - forLayerTime:(CFTimeInterval)timeInterval - displayTime:(const CVTimeStamp *)timeStamp - { - CGLSetCurrentContext(glContext); - if (!initialized) - { - initialized = true; +namespace rx +{ - mFunctions->genFramebuffers(1, &mReadFramebuffer); - } - - const auto &texture = *mSwapState->beingPresented; - if ([self frame].size.width != texture.width || [self frame].size.height != texture.height) - { - [self setFrame:CGRectMake(0, 0, texture.width, texture.height)]; - - // Without this, the OSX compositor / window system doesn't see the resize. - [self setNeedsDisplay]; - } - - // TODO(cwallez) support 2.1 contexts too that don't have blitFramebuffer nor the - // GL_DRAW_FRAMEBUFFER_BINDING query - GLint drawFBO; - mFunctions->getIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFBO); - - mFunctions->bindFramebuffer(GL_FRAMEBUFFER, mReadFramebuffer); - mFunctions->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, - texture.texture, 0); - - mFunctions->bindFramebuffer(GL_READ_FRAMEBUFFER, mReadFramebuffer); - mFunctions->bindFramebuffer(GL_DRAW_FRAMEBUFFER, drawFBO); - mFunctions->blitFramebuffer(0, 0, texture.width, texture.height, 0, 0, texture.width, - texture.height, GL_COLOR_BUFFER_BIT, GL_NEAREST); - - // Call the super method to flush the context - [super drawInCGLContext:glContext - pixelFormat:pixelFormat - forLayerTime:timeInterval - displayTime:timeStamp]; - } - @end - - namespace rx - { - - WindowSurfaceCGL::WindowSurfaceCGL(const egl::SurfaceState &state, - RendererGL *renderer, - EGLNativeWindowType layer, - CGLContextObj context) - : SurfaceGL(state), - mSwapLayer(nil), - mCurrentSwapId(0), - mLayer(reinterpret_cast(layer)), - mContext(context), - mFunctions(renderer->getFunctions()), - mStateManager(renderer->getStateManager()), - mDSRenderbuffer(0) - { - pthread_mutex_init(&mSwapState.mutex, nullptr); +WindowSurfaceCGL::WindowSurfaceCGL(const egl::SurfaceState &state, + RendererGL *renderer, + EGLNativeWindowType layer, + CGLContextObj context) + : SurfaceGL(state), + mSwapLayer(nil), + mCurrentSwapId(0), + mLayer(reinterpret_cast(layer)), + mContext(context), + mFunctions(renderer->getFunctions()), + mStateManager(renderer->getStateManager()), + mDSRenderbuffer(0) +{ + pthread_mutex_init(&mSwapState.mutex, nullptr); } WindowSurfaceCGL::~WindowSurfaceCGL() diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp index 2de9e8f6d..739e2322d 100644 --- a/src/libANGLE/validationES2.cpp +++ b/src/libANGLE/validationES2.cpp @@ -2447,7 +2447,7 @@ static bool ValidateObjectIdentifierAndName(Context *context, GLenum identifier, return true; case GL_TRANSFORM_FEEDBACK: - if (context->getTransformFeedback(name) == nullptr) + if (context->getTransformFeedback({name}) == nullptr) { context->validationError(GL_INVALID_VALUE, kInvalidTransformFeedbackName); return false; diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp index 9b054fa22..9da876e8e 100644 --- a/src/libANGLE/validationES3.cpp +++ b/src/libANGLE/validationES3.cpp @@ -2426,12 +2426,12 @@ bool ValidateDeleteSamplers(Context *context, GLint count, const SamplerID *samp return ValidateGenOrDeleteCountES3(context, count); } -bool ValidateGenTransformFeedbacks(Context *context, GLint n, GLuint *) +bool ValidateGenTransformFeedbacks(Context *context, GLint n, TransformFeedbackID *ids) { return ValidateGenOrDeleteES3(context, n); } -bool ValidateDeleteTransformFeedbacks(Context *context, GLint n, const GLuint *ids) +bool ValidateDeleteTransformFeedbacks(Context *context, GLint n, const TransformFeedbackID *ids) { if (!ValidateGenOrDeleteES3(context, n)) { @@ -3601,7 +3601,7 @@ bool ValidateGetTransformFeedbackVarying(Context *context, return true; } -bool ValidateBindTransformFeedback(Context *context, GLenum target, GLuint id) +bool ValidateBindTransformFeedback(Context *context, GLenum target, TransformFeedbackID id) { if (context->getClientMajorVersion() < 3) { @@ -3639,7 +3639,7 @@ bool ValidateBindTransformFeedback(Context *context, GLenum target, GLuint id) return true; } -bool ValidateIsTransformFeedback(Context *context, GLuint id) +bool ValidateIsTransformFeedback(Context *context, TransformFeedbackID id) { if (context->getClientMajorVersion() < 3) { diff --git a/src/libANGLE/validationES3_autogen.h b/src/libANGLE/validationES3_autogen.h index c27a71ec9..014df5e61 100644 --- a/src/libANGLE/validationES3_autogen.h +++ b/src/libANGLE/validationES3_autogen.h @@ -30,7 +30,7 @@ bool ValidateBindBufferRange(Context *context, GLintptr offset, GLsizeiptr size); bool ValidateBindSampler(Context *context, GLuint unit, SamplerID samplerPacked); -bool ValidateBindTransformFeedback(Context *context, GLenum target, GLuint id); +bool ValidateBindTransformFeedback(Context *context, GLenum target, TransformFeedbackID idPacked); bool ValidateBindVertexArray(Context *context, VertexArrayID arrayPacked); bool ValidateBlitFramebuffer(Context *context, GLint srcX0, @@ -93,7 +93,9 @@ bool ValidateCopyTexSubImage3D(Context *context, bool ValidateDeleteQueries(Context *context, GLsizei n, const QueryID *idsPacked); bool ValidateDeleteSamplers(Context *context, GLsizei count, const SamplerID *samplersPacked); bool ValidateDeleteSync(Context *context, GLsync sync); -bool ValidateDeleteTransformFeedbacks(Context *context, GLsizei n, const GLuint *ids); +bool ValidateDeleteTransformFeedbacks(Context *context, + GLsizei n, + const TransformFeedbackID *idsPacked); bool ValidateDeleteVertexArrays(Context *context, GLsizei n, const VertexArrayID *arraysPacked); bool ValidateDrawArraysInstanced(Context *context, PrimitiveMode modePacked, @@ -129,7 +131,7 @@ bool ValidateFramebufferTextureLayer(Context *context, GLint layer); bool ValidateGenQueries(Context *context, GLsizei n, QueryID *idsPacked); bool ValidateGenSamplers(Context *context, GLsizei count, SamplerID *samplersPacked); -bool ValidateGenTransformFeedbacks(Context *context, GLsizei n, GLuint *ids); +bool ValidateGenTransformFeedbacks(Context *context, GLsizei n, TransformFeedbackID *idsPacked); bool ValidateGenVertexArrays(Context *context, GLsizei n, VertexArrayID *arraysPacked); bool ValidateGetActiveUniformBlockName(Context *context, ShaderProgramID programPacked, @@ -228,7 +230,7 @@ bool ValidateInvalidateSubFramebuffer(Context *context, bool ValidateIsQuery(Context *context, QueryID idPacked); bool ValidateIsSampler(Context *context, SamplerID samplerPacked); bool ValidateIsSync(Context *context, GLsync sync); -bool ValidateIsTransformFeedback(Context *context, GLuint id); +bool ValidateIsTransformFeedback(Context *context, TransformFeedbackID idPacked); bool ValidateIsVertexArray(Context *context, VertexArrayID arrayPacked); bool ValidateMapBufferRange(Context *context, BufferBinding targetPacked, diff --git a/src/libANGLE/validationGL4.cpp b/src/libANGLE/validationGL4.cpp index eda552a46..a1ce0960c 100644 --- a/src/libANGLE/validationGL4.cpp +++ b/src/libANGLE/validationGL4.cpp @@ -41,12 +41,15 @@ bool ValidateBlendFunci(Context *context, GLuint buf, GLenum src, GLenum dst) return true; } -bool ValidateDrawTransformFeedback(Context *context, GLenum mode, GLuint id) +bool ValidateDrawTransformFeedback(Context *context, GLenum mode, TransformFeedbackID id) { return true; } -bool ValidateDrawTransformFeedbackStream(Context *context, GLenum mode, GLuint id, GLuint stream) +bool ValidateDrawTransformFeedbackStream(Context *context, + GLenum mode, + TransformFeedbackID id, + GLuint stream) { return true; } diff --git a/src/libANGLE/validationGL42.cpp b/src/libANGLE/validationGL42.cpp index 4563e333c..f9981c945 100644 --- a/src/libANGLE/validationGL42.cpp +++ b/src/libANGLE/validationGL42.cpp @@ -46,7 +46,7 @@ bool ValidateDrawElementsInstancedBaseVertexBaseInstance(Context *context, bool ValidateDrawTransformFeedbackInstanced(Context *context, GLenum mode, - GLuint id, + TransformFeedbackID id, GLsizei instancecount) { return true; @@ -54,7 +54,7 @@ bool ValidateDrawTransformFeedbackInstanced(Context *context, bool ValidateDrawTransformFeedbackStreamInstanced(Context *context, GLenum mode, - GLuint id, + TransformFeedbackID id, GLuint stream, GLsizei instancecount) { diff --git a/src/libANGLE/validationGL42_autogen.h b/src/libANGLE/validationGL42_autogen.h index f0e45b34b..4a5616cec 100644 --- a/src/libANGLE/validationGL42_autogen.h +++ b/src/libANGLE/validationGL42_autogen.h @@ -40,11 +40,11 @@ bool ValidateDrawElementsInstancedBaseVertexBaseInstance(Context *context, GLuint baseinstance); bool ValidateDrawTransformFeedbackInstanced(Context *context, GLenum mode, - GLuint id, + TransformFeedbackID idPacked, GLsizei instancecount); bool ValidateDrawTransformFeedbackStreamInstanced(Context *context, GLenum mode, - GLuint id, + TransformFeedbackID idPacked, GLuint stream, GLsizei instancecount); bool ValidateGetActiveAtomicCounterBufferiv(Context *context, diff --git a/src/libANGLE/validationGL4_autogen.h b/src/libANGLE/validationGL4_autogen.h index 1f9bc8d58..72b096385 100644 --- a/src/libANGLE/validationGL4_autogen.h +++ b/src/libANGLE/validationGL4_autogen.h @@ -27,8 +27,11 @@ bool ValidateBlendFuncSeparatei(Context *context, GLenum srcAlpha, GLenum dstAlpha); bool ValidateBlendFunci(Context *context, GLuint buf, GLenum src, GLenum dst); -bool ValidateDrawTransformFeedback(Context *context, GLenum mode, GLuint id); -bool ValidateDrawTransformFeedbackStream(Context *context, GLenum mode, GLuint id, GLuint stream); +bool ValidateDrawTransformFeedback(Context *context, GLenum mode, TransformFeedbackID idPacked); +bool ValidateDrawTransformFeedbackStream(Context *context, + GLenum mode, + TransformFeedbackID idPacked, + GLuint stream); bool ValidateEndQueryIndexed(Context *context, GLenum target, GLuint index); bool ValidateGetActiveSubroutineName(Context *context, ShaderProgramID programPacked, diff --git a/src/libGL/entry_points_gl_4_0_autogen.cpp b/src/libGL/entry_points_gl_4_0_autogen.cpp index e5d18237d..e38aea51e 100644 --- a/src/libGL/entry_points_gl_4_0_autogen.cpp +++ b/src/libGL/entry_points_gl_4_0_autogen.cpp @@ -55,14 +55,15 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id) if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateBindTransformFeedback(context, target, id)); + (context->skipValidation() || ValidateBindTransformFeedback(context, target, idPacked)); if (isCallValid) { - context->bindTransformFeedback(target, id); + context->bindTransformFeedback(target, idPacked); } - ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, id); + ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, idPacked); } } @@ -162,14 +163,15 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) if (context) { + const TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->deleteTransformFeedbacks(n, ids); + context->deleteTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -227,14 +229,15 @@ void GL_APIENTRY DrawTransformFeedback(GLenum mode, GLuint id) if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateDrawTransformFeedback(context, mode, id)); + (context->skipValidation() || ValidateDrawTransformFeedback(context, mode, idPacked)); if (isCallValid) { - context->drawTransformFeedback(mode, id); + context->drawTransformFeedback(mode, idPacked); } - ANGLE_CAPTURE(DrawTransformFeedback, isCallValid, context, mode, id); + ANGLE_CAPTURE(DrawTransformFeedback, isCallValid, context, mode, idPacked); } } @@ -247,14 +250,15 @@ void GL_APIENTRY DrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stre if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = (context->skipValidation() || - ValidateDrawTransformFeedbackStream(context, mode, id, stream)); + ValidateDrawTransformFeedbackStream(context, mode, idPacked, stream)); if (isCallValid) { - context->drawTransformFeedbackStream(mode, id, stream); + context->drawTransformFeedbackStream(mode, idPacked, stream); } - ANGLE_CAPTURE(DrawTransformFeedbackStream, isCallValid, context, mode, id, stream); + ANGLE_CAPTURE(DrawTransformFeedbackStream, isCallValid, context, mode, idPacked, stream); } } @@ -286,14 +290,15 @@ void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids) if (context) { + TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->genTransformFeedbacks(n, ids); + context->genTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -560,17 +565,19 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id) GLboolean returnValue; if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); - bool isCallValid = (context->skipValidation() || ValidateIsTransformFeedback(context, id)); + bool isCallValid = + (context->skipValidation() || ValidateIsTransformFeedback(context, idPacked)); if (isCallValid) { - returnValue = context->isTransformFeedback(id); + returnValue = context->isTransformFeedback(idPacked); } else { returnValue = GetDefaultReturnValue(); } - ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, id, returnValue); + ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, idPacked, returnValue); } else { diff --git a/src/libGL/entry_points_gl_4_2_autogen.cpp b/src/libGL/entry_points_gl_4_2_autogen.cpp index f42dbac0e..b7638f087 100644 --- a/src/libGL/entry_points_gl_4_2_autogen.cpp +++ b/src/libGL/entry_points_gl_4_2_autogen.cpp @@ -164,14 +164,16 @@ void GL_APIENTRY DrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); - bool isCallValid = (context->skipValidation() || ValidateDrawTransformFeedbackInstanced( - context, mode, id, instancecount)); + bool isCallValid = + (context->skipValidation() || + ValidateDrawTransformFeedbackInstanced(context, mode, idPacked, instancecount)); if (isCallValid) { - context->drawTransformFeedbackInstanced(mode, id, instancecount); + context->drawTransformFeedbackInstanced(mode, idPacked, instancecount); } - ANGLE_CAPTURE(DrawTransformFeedbackInstanced, isCallValid, context, mode, id, + ANGLE_CAPTURE(DrawTransformFeedbackInstanced, isCallValid, context, mode, idPacked, instancecount); } } @@ -190,16 +192,17 @@ void GL_APIENTRY DrawTransformFeedbackStreamInstanced(GLenum mode, if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = (context->skipValidation() || ValidateDrawTransformFeedbackStreamInstanced( - context, mode, id, stream, instancecount)); + context, mode, idPacked, stream, instancecount)); if (isCallValid) { - context->drawTransformFeedbackStreamInstanced(mode, id, stream, instancecount); + context->drawTransformFeedbackStreamInstanced(mode, idPacked, stream, instancecount); } - ANGLE_CAPTURE(DrawTransformFeedbackStreamInstanced, isCallValid, context, mode, id, stream, - instancecount); + ANGLE_CAPTURE(DrawTransformFeedbackStreamInstanced, isCallValid, context, mode, idPacked, + stream, instancecount); } } diff --git a/src/libGLESv2/entry_points_gles_3_0_autogen.cpp b/src/libGLESv2/entry_points_gles_3_0_autogen.cpp index d3096ba87..ba5d6de48 100644 --- a/src/libGLESv2/entry_points_gles_3_0_autogen.cpp +++ b/src/libGLESv2/entry_points_gles_3_0_autogen.cpp @@ -138,14 +138,15 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id) if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateBindTransformFeedback(context, target, id)); + (context->skipValidation() || ValidateBindTransformFeedback(context, target, idPacked)); if (isCallValid) { - context->bindTransformFeedback(target, id); + context->bindTransformFeedback(target, idPacked); } - ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, id); + ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, idPacked); } } @@ -533,14 +534,15 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) if (context) { + const TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->deleteTransformFeedbacks(n, ids); + context->deleteTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -831,14 +833,15 @@ void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids) if (context) { + TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->genTransformFeedbacks(n, ids); + context->genTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -1593,17 +1596,19 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id) GLboolean returnValue; if (context) { + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); - bool isCallValid = (context->skipValidation() || ValidateIsTransformFeedback(context, id)); + bool isCallValid = + (context->skipValidation() || ValidateIsTransformFeedback(context, idPacked)); if (isCallValid) { - returnValue = context->isTransformFeedback(id); + returnValue = context->isTransformFeedback(idPacked); } else { returnValue = GetDefaultReturnValue(); } - ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, id, returnValue); + ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, idPacked, returnValue); } else { diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/src/libGLESv2/entry_points_gles_ext_autogen.cpp index d310d0803..87ac8bfa9 100644 --- a/src/libGLESv2/entry_points_gles_ext_autogen.cpp +++ b/src/libGLESv2/entry_points_gles_ext_autogen.cpp @@ -7643,14 +7643,15 @@ void GL_APIENTRY BindTransformFeedbackContextANGLE(GLeglContext ctx, GLenum targ if (context) { ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateBindTransformFeedback(context, target, id)); + (context->skipValidation() || ValidateBindTransformFeedback(context, target, idPacked)); if (isCallValid) { - context->bindTransformFeedback(target, id); + context->bindTransformFeedback(target, idPacked); } - ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, id); + ANGLE_CAPTURE(BindTransformFeedback, isCallValid, context, target, idPacked); } } @@ -9560,14 +9561,15 @@ void GL_APIENTRY DeleteTransformFeedbacksContextANGLE(GLeglContext ctx, if (context) { ASSERT(context == GetValidGlobalContext()); + const TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->deleteTransformFeedbacks(n, ids); + context->deleteTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(DeleteTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -11399,14 +11401,15 @@ void GL_APIENTRY GenTransformFeedbacksContextANGLE(GLeglContext ctx, GLsizei n, if (context) { ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID *idsPacked = FromGL(ids); std::unique_lock shareContextLock = GetShareGroupLock(context); bool isCallValid = - (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, ids)); + (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, idsPacked)); if (isCallValid) { - context->genTransformFeedbacks(n, ids); + context->genTransformFeedbacks(n, idsPacked); } - ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, ids); + ANGLE_CAPTURE(GenTransformFeedbacks, isCallValid, context, n, idsPacked); } } @@ -15074,17 +15077,19 @@ GLboolean GL_APIENTRY IsTransformFeedbackContextANGLE(GLeglContext ctx, GLuint i if (context) { ASSERT(context == GetValidGlobalContext()); + TransformFeedbackID idPacked = FromGL(id); std::unique_lock shareContextLock = GetShareGroupLock(context); - bool isCallValid = (context->skipValidation() || ValidateIsTransformFeedback(context, id)); + bool isCallValid = + (context->skipValidation() || ValidateIsTransformFeedback(context, idPacked)); if (isCallValid) { - returnValue = context->isTransformFeedback(id); + returnValue = context->isTransformFeedback(idPacked); } else { returnValue = GetDefaultReturnValue(); } - ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, id, returnValue); + ANGLE_CAPTURE(IsTransformFeedback, isCallValid, context, idPacked, returnValue); } else {