Skip to content

Commit

Permalink
Renaming WEBGL_multiview to OVR_multiview2.
Browse files Browse the repository at this point in the history
Bug: chromium:949249

WebGL working group removed opaque framebuffer support from multiview.
Thus renaming WEBGL_multiview to OVR_multiview2 without opaque
frambuffer support. On the blink side, there is minimal change. We are
connecting to the new ANGLE extension OVR_multiview2.

Change-Id: Id6c8e92950e124474c68e6df0d9519a2f8a31427
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1552142
Commit-Queue: Mingyu Hu <mihu@microsoft.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649951}
  • Loading branch information
mingyuhu authored and Commit Bot committed Apr 11, 2019
1 parent 04df6de commit c58c8fa
Show file tree
Hide file tree
Showing 47 changed files with 307 additions and 339 deletions.
12 changes: 4 additions & 8 deletions content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
Expand Up @@ -29,14 +29,10 @@ def SetExpectations(self):
['win', 'mac', 'linux'])
self.Skip('WebglExtension_WEBGL_compressed_texture_s3tc_srgb',
['win', 'mac', 'linux'])
self.Skip('WebglExtension_WEBGL_multiview',
['mac', 'linux', 'android'], bug=864524)
# The multiview extension is only expected to be supported through ANGLE.
self.Skip('WebglExtension_WEBGL_multiview',
['win', 'no_passthrough'], bug=864524)
# # ANGLE's OpenGL backend supports multiview only on NVIDIA.
self.Skip('WebglExtension_WEBGL_multiview',
['win', 'passthrough', 'opengl', 'intel'], bug=864524)
# Disabling all multiview checks temporarily while ANGLE side changes
# get merged in.
self.Skip('WebglExtension_OVR_multiview2',
['win', 'mac', 'linux', 'android'], bug=864524)
self.Skip('WebglExtension_EXT_disjoint_timer_query_webgl2',
['android'], bug=808744)
self.Skip('WebglExtension_KHR_parallel_shader_compile',
Expand Down
Expand Up @@ -181,6 +181,7 @@ def _GetExtensionList(cls):
'EXT_texture_filter_anisotropic',
'KHR_parallel_shader_compile',
'OES_texture_float_linear',
'OVR_multiview2',
'WEBGL_compressed_texture_astc',
'WEBGL_compressed_texture_etc',
'WEBGL_compressed_texture_etc1',
Expand All @@ -192,7 +193,6 @@ def _GetExtensionList(cls):
'WEBGL_lose_context',
'WEBGL_multi_draw',
'WEBGL_multi_draw_instanced',
'WEBGL_multiview',
'WEBGL_video_texture',
]

Expand Down
4 changes: 2 additions & 2 deletions gpu/GLES2/gl2chromium_autogen.h
Expand Up @@ -413,8 +413,8 @@
#define glDestroyGpuFenceCHROMIUM GLES2_GET_FUN(DestroyGpuFenceCHROMIUM)
#define glInvalidateReadbackBufferShadowDataCHROMIUM \
GLES2_GET_FUN(InvalidateReadbackBufferShadowDataCHROMIUM)
#define glFramebufferTextureMultiviewLayeredANGLE \
GLES2_GET_FUN(FramebufferTextureMultiviewLayeredANGLE)
#define glFramebufferTextureMultiviewOVR \
GLES2_GET_FUN(FramebufferTextureMultiviewOVR)
#define glMaxShaderCompilerThreadsKHR GLES2_GET_FUN(MaxShaderCompilerThreadsKHR)
#define glCreateAndTexStorage2DSharedImageCHROMIUM \
GLES2_GET_FUN(CreateAndTexStorage2DSharedImageCHROMIUM)
Expand Down
8 changes: 4 additions & 4 deletions gpu/command_buffer/build_gles2_cmd_buffer.py
Expand Up @@ -4261,11 +4261,11 @@
'extension': 'MESA_framebuffer_flip_y',
'extension_flag': 'mesa_framebuffer_flip_y',
},
'FramebufferTextureMultiviewLayeredANGLE': {
'decoder_func': 'DoFramebufferTextureMultiviewLayeredANGLE',
'FramebufferTextureMultiviewOVR': {
'decoder_func': 'DoFramebufferTextureMultiviewOVR',
'unit_test': False,
'extension': 'ANGLE_multiview',
'extension_flag': 'angle_multiview',
'extension': 'OVR_multiview2',
'extension_flag': 'ovr_multiview2',
'trace_level': 1,
'es3': True
},
Expand Down
19 changes: 9 additions & 10 deletions gpu/command_buffer/client/gles2_c_lib_autogen.h
Expand Up @@ -1900,14 +1900,13 @@ void GL_APIENTRY
GLES2InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) {
gles2::GetGLContext()->InvalidateReadbackBufferShadowDataCHROMIUM(buffer_id);
}
void GL_APIENTRY
GLES2FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
gles2::GetGLContext()->FramebufferTextureMultiviewLayeredANGLE(
void GL_APIENTRY GLES2FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
gles2::GetGLContext()->FramebufferTextureMultiviewOVR(
target, attachment, texture, level, baseViewIndex, numViews);
}
void GL_APIENTRY GLES2MaxShaderCompilerThreadsKHR(GLuint count) {
Expand Down Expand Up @@ -3410,9 +3409,9 @@ extern const NameToFunc g_gles2_function_table[] = {
glInvalidateReadbackBufferShadowDataCHROMIUM),
},
{
"glFramebufferTextureMultiviewLayeredANGLE",
"glFramebufferTextureMultiviewOVR",
reinterpret_cast<GLES2FunctionPointer>(
glFramebufferTextureMultiviewLayeredANGLE),
glFramebufferTextureMultiviewOVR),
},
{
"glMaxShaderCompilerThreadsKHR",
Expand Down
16 changes: 8 additions & 8 deletions gpu/command_buffer/client/gles2_cmd_helper_autogen.h
Expand Up @@ -3524,14 +3524,14 @@ void SetReadbackBufferShadowAllocationINTERNAL(GLuint buffer_id,
}
}

void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
gles2::cmds::FramebufferTextureMultiviewLayeredANGLE* c =
GetCmdSpace<gles2::cmds::FramebufferTextureMultiviewLayeredANGLE>();
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
gles2::cmds::FramebufferTextureMultiviewOVR* c =
GetCmdSpace<gles2::cmds::FramebufferTextureMultiviewOVR>();
if (c) {
c->Init(target, attachment, texture, level, baseViewIndex, numViews);
}
Expand Down
12 changes: 6 additions & 6 deletions gpu/command_buffer/client/gles2_implementation_autogen.h
Expand Up @@ -1339,12 +1339,12 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;

void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;

void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;

void MaxShaderCompilerThreadsKHR(GLuint count) override;

Expand Down
31 changes: 15 additions & 16 deletions gpu/command_buffer/client/gles2_implementation_impl_autogen.h
Expand Up @@ -3790,26 +3790,25 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
CheckGLError();
}

void GLES2Implementation::FramebufferTextureMultiviewLayeredANGLE(
GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG(
"[" << GetLogPrefix() << "] glFramebufferTextureMultiviewLayeredANGLE("
<< GLES2Util::GetStringEnum(target) << ", "
<< GLES2Util::GetStringEnum(attachment) << ", " << texture << ", "
<< level << ", " << baseViewIndex << ", " << numViews << ")");
void GLES2Implementation::FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glFramebufferTextureMultiviewOVR("
<< GLES2Util::GetStringEnum(target) << ", "
<< GLES2Util::GetStringEnum(attachment) << ", " << texture
<< ", " << level << ", " << baseViewIndex << ", "
<< numViews << ")");
if (numViews < 0) {
SetGLError(GL_INVALID_VALUE, "glFramebufferTextureMultiviewLayeredANGLE",
SetGLError(GL_INVALID_VALUE, "glFramebufferTextureMultiviewOVR",
"numViews < 0");
return;
}
helper_->FramebufferTextureMultiviewLayeredANGLE(
target, attachment, texture, level, baseViewIndex, numViews);
helper_->FramebufferTextureMultiviewOVR(target, attachment, texture, level,
baseViewIndex, numViews);
CheckGLError();
}

Expand Down
Expand Up @@ -3227,14 +3227,14 @@ TEST_F(GLES2ImplementationTest, DestroyGpuFenceCHROMIUM) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}

TEST_F(GLES2ImplementationTest, FramebufferTextureMultiviewLayeredANGLE) {
TEST_F(GLES2ImplementationTest, FramebufferTextureMultiviewOVR) {
struct Cmds {
cmds::FramebufferTextureMultiviewLayeredANGLE cmd;
cmds::FramebufferTextureMultiviewOVR cmd;
};
Cmds expected;
expected.cmd.Init(1, 2, 3, 4, 5, 6);

gl_->FramebufferTextureMultiviewLayeredANGLE(1, 2, 3, 4, 5, 6);
gl_->FramebufferTextureMultiviewOVR(1, 2, 3, 4, 5, 6);
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}

Expand Down
12 changes: 6 additions & 6 deletions gpu/command_buffer/client/gles2_interface_autogen.h
Expand Up @@ -1007,12 +1007,12 @@ virtual GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) = 0;
virtual void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
virtual void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
virtual void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) = 0;
virtual void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) = 0;
virtual void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) = 0;
virtual void MaxShaderCompilerThreadsKHR(GLuint count) = 0;
virtual GLuint CreateAndTexStorage2DSharedImageCHROMIUM(
const GLbyte* mailbox) = 0;
Expand Down
12 changes: 6 additions & 6 deletions gpu/command_buffer/client/gles2_interface_stub_autogen.h
Expand Up @@ -977,12 +977,12 @@ GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;
void MaxShaderCompilerThreadsKHR(GLuint count) override;
GLuint CreateAndTexStorage2DSharedImageCHROMIUM(const GLbyte* mailbox) override;
GLuint CreateAndTexStorage2DSharedImageWithInternalFormatCHROMIUM(
Expand Down
Expand Up @@ -1298,7 +1298,7 @@ void GLES2InterfaceStub::WaitGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
void GLES2InterfaceStub::DestroyGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
void GLES2InterfaceStub::InvalidateReadbackBufferShadowDataCHROMIUM(
GLuint /* buffer_id */) {}
void GLES2InterfaceStub::FramebufferTextureMultiviewLayeredANGLE(
void GLES2InterfaceStub::FramebufferTextureMultiviewOVR(
GLenum /* target */,
GLenum /* attachment */,
GLuint /* texture */,
Expand Down
12 changes: 6 additions & 6 deletions gpu/command_buffer/client/gles2_trace_implementation_autogen.h
Expand Up @@ -977,12 +977,12 @@ GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;
void FramebufferTextureMultiviewOVR(GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) override;
void MaxShaderCompilerThreadsKHR(GLuint count) override;
GLuint CreateAndTexStorage2DSharedImageCHROMIUM(const GLbyte* mailbox) override;
GLuint CreateAndTexStorage2DSharedImageWithInternalFormatCHROMIUM(
Expand Down
Expand Up @@ -2731,17 +2731,17 @@ void GLES2TraceImplementation::InvalidateReadbackBufferShadowDataCHROMIUM(
gl_->InvalidateReadbackBufferShadowDataCHROMIUM(buffer_id);
}

void GLES2TraceImplementation::FramebufferTextureMultiviewLayeredANGLE(
void GLES2TraceImplementation::FramebufferTextureMultiviewOVR(
GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint baseViewIndex,
GLsizei numViews) {
TRACE_EVENT_BINARY_EFFICIENT0(
"gpu", "GLES2Trace::FramebufferTextureMultiviewLayeredANGLE");
gl_->FramebufferTextureMultiviewLayeredANGLE(target, attachment, texture,
level, baseViewIndex, numViews);
TRACE_EVENT_BINARY_EFFICIENT0("gpu",
"GLES2Trace::FramebufferTextureMultiviewOVR");
gl_->FramebufferTextureMultiviewOVR(target, attachment, texture, level,
baseViewIndex, numViews);
}

void GLES2TraceImplementation::MaxShaderCompilerThreadsKHR(GLuint count) {
Expand Down
44 changes: 19 additions & 25 deletions gpu/command_buffer/common/gles2_cmd_format_autogen.h
Expand Up @@ -17353,9 +17353,9 @@ static_assert(
offsetof(SetReadbackBufferShadowAllocationINTERNAL, size) == 16,
"offset of SetReadbackBufferShadowAllocationINTERNAL size should be 16");

struct FramebufferTextureMultiviewLayeredANGLE {
typedef FramebufferTextureMultiviewLayeredANGLE ValueType;
static const CommandId kCmdId = kFramebufferTextureMultiviewLayeredANGLE;
struct FramebufferTextureMultiviewOVR {
typedef FramebufferTextureMultiviewOVR ValueType;
static const CommandId kCmdId = kFramebufferTextureMultiviewOVR;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);

Expand Down Expand Up @@ -17401,30 +17401,24 @@ struct FramebufferTextureMultiviewLayeredANGLE {
int32_t numViews;
};

static_assert(sizeof(FramebufferTextureMultiviewLayeredANGLE) == 28,
"size of FramebufferTextureMultiviewLayeredANGLE should be 28");
static_assert(sizeof(FramebufferTextureMultiviewOVR) == 28,
"size of FramebufferTextureMultiviewOVR should be 28");
static_assert(offsetof(FramebufferTextureMultiviewOVR, header) == 0,
"offset of FramebufferTextureMultiviewOVR header should be 0");
static_assert(offsetof(FramebufferTextureMultiviewOVR, target) == 4,
"offset of FramebufferTextureMultiviewOVR target should be 4");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, header) == 0,
"offset of FramebufferTextureMultiviewLayeredANGLE header should be 0");
offsetof(FramebufferTextureMultiviewOVR, attachment) == 8,
"offset of FramebufferTextureMultiviewOVR attachment should be 8");
static_assert(offsetof(FramebufferTextureMultiviewOVR, texture) == 12,
"offset of FramebufferTextureMultiviewOVR texture should be 12");
static_assert(offsetof(FramebufferTextureMultiviewOVR, level) == 16,
"offset of FramebufferTextureMultiviewOVR level should be 16");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, target) == 4,
"offset of FramebufferTextureMultiviewLayeredANGLE target should be 4");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, attachment) == 8,
"offset of FramebufferTextureMultiviewLayeredANGLE attachment should be 8");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, texture) == 12,
"offset of FramebufferTextureMultiviewLayeredANGLE texture should be 12");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, level) == 16,
"offset of FramebufferTextureMultiviewLayeredANGLE level should be 16");
static_assert(offsetof(FramebufferTextureMultiviewLayeredANGLE,
baseViewIndex) == 20,
"offset of FramebufferTextureMultiviewLayeredANGLE baseViewIndex "
"should be 20");
static_assert(
offsetof(FramebufferTextureMultiviewLayeredANGLE, numViews) == 24,
"offset of FramebufferTextureMultiviewLayeredANGLE numViews should be 24");
offsetof(FramebufferTextureMultiviewOVR, baseViewIndex) == 20,
"offset of FramebufferTextureMultiviewOVR baseViewIndex should be 20");
static_assert(offsetof(FramebufferTextureMultiviewOVR, numViews) == 24,
"offset of FramebufferTextureMultiviewOVR numViews should be 24");

struct MaxShaderCompilerThreadsKHR {
typedef MaxShaderCompilerThreadsKHR ValueType;
Expand Down
9 changes: 4 additions & 5 deletions gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
Expand Up @@ -5727,15 +5727,14 @@ TEST_F(GLES2FormatTest, SetReadbackBufferShadowAllocationINTERNAL) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}

TEST_F(GLES2FormatTest, FramebufferTextureMultiviewLayeredANGLE) {
cmds::FramebufferTextureMultiviewLayeredANGLE& cmd =
*GetBufferAs<cmds::FramebufferTextureMultiviewLayeredANGLE>();
TEST_F(GLES2FormatTest, FramebufferTextureMultiviewOVR) {
cmds::FramebufferTextureMultiviewOVR& cmd =
*GetBufferAs<cmds::FramebufferTextureMultiviewOVR>();
void* next_cmd =
cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12),
static_cast<GLuint>(13), static_cast<GLint>(14),
static_cast<GLint>(15), static_cast<GLsizei>(16));
EXPECT_EQ(static_cast<uint32_t>(
cmds::FramebufferTextureMultiviewLayeredANGLE::kCmdId),
EXPECT_EQ(static_cast<uint32_t>(cmds::FramebufferTextureMultiviewOVR::kCmdId),
cmd.header.command);
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
Expand Down
2 changes: 1 addition & 1 deletion gpu/command_buffer/common/gles2_cmd_ids_autogen.h
Expand Up @@ -356,7 +356,7 @@
OP(WaitGpuFenceCHROMIUM) /* 597 */ \
OP(DestroyGpuFenceCHROMIUM) /* 598 */ \
OP(SetReadbackBufferShadowAllocationINTERNAL) /* 599 */ \
OP(FramebufferTextureMultiviewLayeredANGLE) /* 600 */ \
OP(FramebufferTextureMultiviewOVR) /* 600 */ \
OP(MaxShaderCompilerThreadsKHR) /* 601 */ \
OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 602 */ \
OP(BeginSharedImageAccessDirectCHROMIUM) /* 603 */ \
Expand Down
4 changes: 2 additions & 2 deletions gpu/command_buffer/gles2_cmd_buffer_functions.txt
Expand Up @@ -417,8 +417,8 @@ GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM
// (used for CHROMIUM_nonblocking_readback implementation)
GL_APICALL void GL_APIENTRY glSetReadbackBufferShadowAllocationINTERNAL (GLidBuffer buffer_id, GLint shm_id, GLuint shm_offset, GLuint size);

// Extension ANGLE_multiview
GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewLayeredANGLE (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
// Extension OVR_multiview2
GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);

// Extension KHR_parallel_shader_compile
GL_APICALL void GL_APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count);
Expand Down

0 comments on commit c58c8fa

Please sign in to comment.