Commit 89664843 by Olli Etuaho Committed by Commit Bot

Add glTexStorage3DMultisampleANGLE entry point

This adds the entry point but does not implement it yet. The entry point and enums are also added to the gl2ext_angle.h header file. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I24c231c52e7cbb13637880b21044e655935b51e8 Reviewed-on: https://chromium-review.googlesource.com/1188575Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 8707af51
...@@ -554,6 +554,20 @@ typedef void *GLeglContext; ...@@ -554,6 +554,20 @@ typedef void *GLeglContext;
#include "../GLES3/gl31ext_explicit_context_autogen.inc" #include "../GLES3/gl31ext_explicit_context_autogen.inc"
#endif /* GL_ANGLE_explicit_context */ #endif /* GL_ANGLE_explicit_context */
#ifndef GL_ANGLE_texture_multisample_array
#define GL_ANGLE_texture_multisample_array 1
// The enums coincide with the enums from GLES 3.2.
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_ANGLE 0x9102
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_ANGLE 0x9105
#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_ANGLE 0x910B
#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_ANGLE 0x910C
#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_ANGLE 0x910D
typedef void(GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEANGLE)(GLenum target, GLsizei samples, GLint sizedinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleANGLE(GLenum target, GLsizei samples, GLint sizedinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
#endif
#endif /* GL_ANGLE_texture_multisample_array */
// clang-format on // clang-format on
#endif // INCLUDE_GLES2_GL2EXT_ANGLE_H_ #endif // INCLUDE_GLES2_GL2EXT_ANGLE_H_
...@@ -309,6 +309,7 @@ typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VROBUSTANGLECONTEXTANGLE)(GLegl ...@@ -309,6 +309,7 @@ typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VROBUSTANGLECONTEXTANGLE)(GLegl
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params); typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VROBUSTANGLECONTEXTANGLE)(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params);
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWLAYEREDANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWLAYEREDANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWSIDEBYSIDEANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets); typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWSIDEBYSIDEANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets);
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEANGLECONTEXTANGLE)(GLeglContext ctx, GLenum target, GLsizei samples, GLint sizedinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
#ifdef GL_GLEXT_PROTOTYPES #ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTextureContextANGLE(GLeglContext ctx, GLenum texture); GL_APICALL void GL_APIENTRY glActiveTextureContextANGLE(GLeglContext ctx, GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader); GL_APICALL void GL_APIENTRY glAttachShaderContextANGLE(GLeglContext ctx, GLuint program, GLuint shader);
...@@ -611,4 +612,5 @@ GL_APICALL void GL_APIENTRY glGetQueryObjecti64vRobustANGLEContextANGLE(GLeglCon ...@@ -611,4 +612,5 @@ GL_APICALL void GL_APIENTRY glGetQueryObjecti64vRobustANGLEContextANGLE(GLeglCon
GL_APICALL void GL_APIENTRY glGetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params); GL_APICALL void GL_APIENTRY glGetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx, GLuint id, GLenum pname, GLsizei bufSize, GLsizei * length, GLuint64 * params);
GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewLayeredANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewLayeredANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets); GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei numViews, const GLint * viewportOffsets);
GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleANGLEContextANGLE(GLeglContext ctx, GLenum target, GLsizei samples, GLint sizedinternalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
#endif #endif
...@@ -367,6 +367,9 @@ ...@@ -367,6 +367,9 @@
"glTexStorage2DMultisample": { "glTexStorage2DMultisample": {
"target": "TextureType" "target": "TextureType"
}, },
"glTexStorage3DMultisampleANGLE": {
"target": "TextureType"
},
"glTexStorage3D": { "glTexStorage3D": {
"target": "TextureType" "target": "TextureType"
}, },
......
...@@ -24,6 +24,7 @@ angle_extensions = [ ...@@ -24,6 +24,7 @@ angle_extensions = [
"GL_ANGLE_request_extension", "GL_ANGLE_request_extension",
"GL_ANGLE_robust_client_memory", "GL_ANGLE_robust_client_memory",
"GL_ANGLE_multiview", "GL_ANGLE_multiview",
"GL_ANGLE_texture_multisample_array",
] ]
gles1_extensions = [ gles1_extensions = [
......
...@@ -815,6 +815,16 @@ ...@@ -815,6 +815,16 @@
<param><ptype>GLsizei</ptype> <name>numViews</name></param> <param><ptype>GLsizei</ptype> <name>numViews</name></param>
<param><ptype>const GLint *</ptype> <name>viewportOffsets</name></param> <param><ptype>const GLint *</ptype> <name>viewportOffsets</name></param>
</command> </command>
<command>
<proto>void <name>glTexStorage3DMultisampleANGLE</name></proto>
<param><ptype>GLenum</ptype> <name>target</name></param>
<param><ptype>GLsizei</ptype> <name>samples</name></param>
<param><ptype>GLint</ptype> <name>sizedinternalformat</name></param>
<param><ptype>GLsizei</ptype> <name>width</name></param>
<param><ptype>GLsizei</ptype> <name>height</name></param>
<param><ptype>GLsizei</ptype> <name>depth</name></param>
<param><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
</command>
</commands> </commands>
<!-- SECTION: ANGLE extension interface definitions --> <!-- SECTION: ANGLE extension interface definitions -->
<extensions> <extensions>
...@@ -947,5 +957,10 @@ ...@@ -947,5 +957,10 @@
<command name="glFramebufferTextureMultiviewLayeredANGLE"/> <command name="glFramebufferTextureMultiviewLayeredANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_texture_multisample_array" supported='gl'>
<require>
<command name="glTexStorage3DMultisampleANGLE"/>
</require>
</extension>
</extensions> </extensions>
</registry> </registry>
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
"GL copy conversion table:src/libANGLE/gen_copy_conversion_table.py": "GL copy conversion table:src/libANGLE/gen_copy_conversion_table.py":
"ac1afe23d9578bd1d2ef74f4a7aa927a", "ac1afe23d9578bd1d2ef74f4a7aa927a",
"GL entry point:scripts/entry_point_packed_gl_enums.json": "GL entry point:scripts/entry_point_packed_gl_enums.json":
"803930a62d35ed9b83faba037f34e293", "7412abe534b86730a7949fe5b37db832",
"GL entry point:scripts/generate_entry_points.py": "GL entry point:scripts/generate_entry_points.py":
"c502f05207c8a2eb27ae67e48b5d02c2", "0f7d70a72b497f577c9db4fc164097d7",
"GL entry point:scripts/gl.xml": "GL entry point:scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708", "b470cb06b06cbbe7adb2c8129ec85708",
"GL format map:src/libANGLE/es3_format_type_combinations.json": "GL format map:src/libANGLE/es3_format_type_combinations.json":
......
...@@ -4994,6 +4994,17 @@ void Context::texStorage2DMultisample(TextureType target, ...@@ -4994,6 +4994,17 @@ void Context::texStorage2DMultisample(TextureType target,
ConvertToBool(fixedsamplelocations))); ConvertToBool(fixedsamplelocations)));
} }
void Context::texStorage3DMultisample(TextureType target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
UNIMPLEMENTED();
}
void Context::getMultisamplefv(GLenum pname, GLuint index, GLfloat *val) void Context::getMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
{ {
// According to spec 3.1 Table 20.49: Framebuffer Dependent Values, // According to spec 3.1 Table 20.49: Framebuffer Dependent Values,
......
...@@ -1041,6 +1041,14 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl ...@@ -1041,6 +1041,14 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLsizei height, GLsizei height,
GLboolean fixedsamplelocations); GLboolean fixedsamplelocations);
void texStorage3DMultisample(TextureType target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations);
void getMultisamplefv(GLenum pname, GLuint index, GLfloat *val); void getMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
void getMultisamplefvRobust(GLenum pname, void getMultisamplefvRobust(GLenum pname,
GLuint index, GLuint index,
......
...@@ -542,6 +542,7 @@ enum class EntryPoint ...@@ -542,6 +542,7 @@ enum class EntryPoint
TexStorage2DMultisample, TexStorage2DMultisample,
TexStorage3D, TexStorage3D,
TexStorage3DEXT, TexStorage3DEXT,
TexStorage3DMultisampleANGLE,
TexSubImage2D, TexSubImage2D,
TexSubImage2DRobustANGLE, TexSubImage2DRobustANGLE,
TexSubImage3D, TexSubImage3D,
......
...@@ -2012,4 +2012,18 @@ bool ValidateFramebufferTextureEXT(Context *context, ...@@ -2012,4 +2012,18 @@ bool ValidateFramebufferTextureEXT(Context *context,
return true; return true;
} }
// GL_ANGLE_texture_multisample_array
bool ValidateTexStorage3DMultisampleANGLE(Context *context,
TextureType target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
UNIMPLEMENTED();
return false;
}
} // namespace gl } // namespace gl
...@@ -362,6 +362,16 @@ bool ValidateFramebufferTextureEXT(Context *context, ...@@ -362,6 +362,16 @@ bool ValidateFramebufferTextureEXT(Context *context,
GLuint texture, GLuint texture,
GLint level); GLint level);
// GL_ANGLE_texture_multisample_array
bool ValidateTexStorage3DMultisampleANGLE(Context *context,
TextureType target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations);
} // namespace gl } // namespace gl
#endif // LIBANGLE_VALIDATION_ES31_H_ #endif // LIBANGLE_VALIDATION_ES31_H_
...@@ -1932,6 +1932,37 @@ void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, ...@@ -1932,6 +1932,37 @@ void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id,
} }
} }
// GL_ANGLE_texture_multisample_array
void GL_APIENTRY TexStorage3DMultisampleANGLE(GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
EVENT(
"(GLenum target = 0x%X, GLsizei samples = %d, GLint sizedinternalformat = %d, GLsizei "
"width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean fixedsamplelocations = %u)",
target, samples, sizedinternalformat, width, height, depth, fixedsamplelocations);
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
context->gatherParams<EntryPoint::TexStorage3DMultisampleANGLE>(
targetPacked, samples, sizedinternalformat, width, height, depth, fixedsamplelocations);
if (context->skipValidation() || ValidateTexStorage3DMultisampleANGLE(
context, targetPacked, samples, sizedinternalformat,
width, height, depth, fixedsamplelocations))
{
context->texStorage3DMultisample(targetPacked, samples, sizedinternalformat, width,
height, depth, fixedsamplelocations);
}
}
}
// GL_ANGLE_translated_shader_source // GL_ANGLE_translated_shader_source
void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader, void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize, GLsizei bufsize,
...@@ -17797,4 +17828,36 @@ FramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, ...@@ -17797,4 +17828,36 @@ FramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx,
} }
} }
} }
void GL_APIENTRY TexStorage3DMultisampleANGLEContextANGLE(GLeglContext ctx,
GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
EVENT(
"(GLenum target = 0x%X, GLsizei samples = %d, GLint sizedinternalformat = %d, GLsizei "
"width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean fixedsamplelocations = %u)",
target, samples, sizedinternalformat, width, height, depth, fixedsamplelocations);
Context *context = static_cast<gl::Context *>(ctx);
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
context->gatherParams<EntryPoint::TexStorage3DMultisampleANGLE>(
targetPacked, samples, sizedinternalformat, width, height, depth, fixedsamplelocations);
if (context->skipValidation() || ValidateTexStorage3DMultisampleANGLE(
context, targetPacked, samples, sizedinternalformat,
width, height, depth, fixedsamplelocations))
{
context->texStorage3DMultisample(targetPacked, samples, sizedinternalformat, width,
height, depth, fixedsamplelocations);
}
}
}
} // namespace gl } // namespace gl
...@@ -437,6 +437,15 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, ...@@ -437,6 +437,15 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id,
GLsizei *length, GLsizei *length,
GLuint64 *params); GLuint64 *params);
// GL_ANGLE_texture_multisample_array
ANGLE_EXPORT void GL_APIENTRY TexStorage3DMultisampleANGLE(GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations);
// GL_ANGLE_translated_shader_source // GL_ANGLE_translated_shader_source
ANGLE_EXPORT void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader, ANGLE_EXPORT void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize, GLsizei bufsize,
...@@ -3272,6 +3281,15 @@ FramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, ...@@ -3272,6 +3281,15 @@ FramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx,
GLint level, GLint level,
GLsizei numViews, GLsizei numViews,
const GLint *viewportOffsets); const GLint *viewportOffsets);
ANGLE_EXPORT void GL_APIENTRY
TexStorage3DMultisampleANGLEContextANGLE(GLeglContext ctx,
GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations);
} // namespace gl } // namespace gl
#endif // LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_ #endif // LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_
...@@ -3136,6 +3136,19 @@ void GL_APIENTRY glGetQueryObjectui64vRobustANGLE(GLuint id, ...@@ -3136,6 +3136,19 @@ void GL_APIENTRY glGetQueryObjectui64vRobustANGLE(GLuint id,
return gl::GetQueryObjectui64vRobustANGLE(id, pname, bufSize, length, params); return gl::GetQueryObjectui64vRobustANGLE(id, pname, bufSize, length, params);
} }
// GL_ANGLE_texture_multisample_array
void GL_APIENTRY glTexStorage3DMultisampleANGLE(GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
return gl::TexStorage3DMultisampleANGLE(target, samples, sizedinternalformat, width, height,
depth, fixedsamplelocations);
}
// GL_ANGLE_translated_shader_source // GL_ANGLE_translated_shader_source
void GL_APIENTRY glGetTranslatedShaderSourceANGLE(GLuint shader, void GL_APIENTRY glGetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize, GLsizei bufsize,
...@@ -8727,4 +8740,17 @@ glFramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx, ...@@ -8727,4 +8740,17 @@ glFramebufferTextureMultiviewSideBySideANGLEContextANGLE(GLeglContext ctx,
ctx, target, attachment, texture, level, numViews, viewportOffsets); ctx, target, attachment, texture, level, numViews, viewportOffsets);
} }
void GL_APIENTRY glTexStorage3DMultisampleANGLEContextANGLE(GLeglContext ctx,
GLenum target,
GLsizei samples,
GLint sizedinternalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
return gl::TexStorage3DMultisampleANGLEContextANGLE(ctx, target, samples, sizedinternalformat,
width, height, depth, fixedsamplelocations);
}
} // extern "C" } // extern "C"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment