-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Use a constexpr array for es3 copy conversion table."
This reverts commit f30808d. Reason for revert: build/android/gyp/assert_static_initializers.py thinks this adds a static initializer. See https://ci.chromium.org/p/chromium/builders/try/android-marshmallow-arm64-rel/208664 Need to revert since this is blocking the roll. Original change's description: > Use a constexpr array for es3 copy conversion table. > > With the relaxed C++14 constexpr rules allowed in Chromium, we can > use a constexpr sorted array to store our table data. This can lead > to very fast lookups while being more maintanable than using auto- > generator scripts for every lookup table. > > Note that to be sure this syntax is permitted, we should land this > through the bots and let it sit for a little while. > > Bug: angleproject:1389 > Change-Id: I9395c40276470108ce3e5786d8f1b8d85462c517 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/777544 > Commit-Queue: Jamie Madill <jmadill@google.com> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> TBR=ynovikov@chromium.org,jmadill@google.com,syoussefi@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:1389 Change-Id: I482729b6f16975896b0e5c29999f9a081056e800 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1506238 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
- Loading branch information
Showing
8 changed files
with
230 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"From ES 3.0.1 spec, table 3.15": | ||
[ | ||
[ "GL_ALPHA", "GL_RGBA" ], | ||
[ "GL_LUMINANCE", "GL_RED" ], | ||
[ "GL_LUMINANCE", "GL_RG" ], | ||
[ "GL_LUMINANCE", "GL_RGB" ], | ||
[ "GL_LUMINANCE", "GL_RGBA" ], | ||
[ "GL_LUMINANCE_ALPHA", "GL_RGBA" ], | ||
[ "GL_RED", "GL_RED" ], | ||
[ "GL_RED", "GL_RG" ], | ||
[ "GL_RED", "GL_RGB" ], | ||
[ "GL_RED", "GL_RGBA" ], | ||
[ "GL_RG", "GL_RG" ], | ||
[ "GL_RG", "GL_RGB" ], | ||
[ "GL_RG", "GL_RGBA" ], | ||
[ "GL_RGB", "GL_RGB" ], | ||
[ "GL_RGB", "GL_RGBA" ], | ||
[ "GL_RGBA", "GL_RGBA" ] | ||
], | ||
|
||
"Necessary for ANGLE back-buffers": | ||
[ | ||
[ "GL_ALPHA", "GL_BGRA_EXT" ], | ||
[ "GL_LUMINANCE", "GL_BGRA_EXT" ], | ||
[ "GL_LUMINANCE_ALPHA", "GL_BGRA_EXT" ], | ||
[ "GL_RED", "GL_BGRA_EXT" ], | ||
[ "GL_RG", "GL_BGRA_EXT" ], | ||
[ "GL_RGB", "GL_BGRA_EXT" ], | ||
[ "GL_RGBA", "GL_BGRA_EXT" ], | ||
[ "GL_BGRA_EXT", "GL_BGRA_EXT" ], | ||
|
||
[ "GL_RED_INTEGER", "GL_RED_INTEGER" ], | ||
[ "GL_RED_INTEGER", "GL_RG_INTEGER" ], | ||
[ "GL_RED_INTEGER", "GL_RGB_INTEGER" ], | ||
[ "GL_RED_INTEGER", "GL_RGBA_INTEGER" ], | ||
[ "GL_RG_INTEGER", "GL_RG_INTEGER" ], | ||
[ "GL_RG_INTEGER", "GL_RGB_INTEGER" ], | ||
[ "GL_RG_INTEGER", "GL_RGBA_INTEGER" ], | ||
[ "GL_RGB_INTEGER", "GL_RGB_INTEGER" ], | ||
[ "GL_RGB_INTEGER", "GL_RGBA_INTEGER" ], | ||
[ "GL_RGBA_INTEGER", "GL_RGBA_INTEGER" ] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
// GENERATED FILE - DO NOT EDIT. | ||
// Generated by gen_copy_conversion_table.py using data from es3_copy_conversion_formats.json. | ||
// | ||
// Copyright 2018 The ANGLE Project Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
// | ||
// format_map: | ||
// Determining the sized internal format from a (format,type) pair. | ||
// Also check es3 format combinations for validity. | ||
|
||
#include "angle_gl.h" | ||
#include "common/debug.h" | ||
|
||
namespace gl | ||
{ | ||
|
||
bool ValidES3CopyConversion(GLenum textureFormat, GLenum framebufferFormat) | ||
{ | ||
switch (textureFormat) | ||
{ | ||
case GL_ALPHA: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_BGRA_EXT: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_LUMINANCE: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RED: | ||
case GL_RG: | ||
case GL_RGB: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_LUMINANCE_ALPHA: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RED: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RED: | ||
case GL_RG: | ||
case GL_RGB: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RED_INTEGER: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_RED_INTEGER: | ||
case GL_RGBA_INTEGER: | ||
case GL_RGB_INTEGER: | ||
case GL_RG_INTEGER: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RG: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RG: | ||
case GL_RGB: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RGB: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RGB: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RGBA: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_BGRA_EXT: | ||
case GL_RGBA: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RGBA_INTEGER: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_RGBA_INTEGER: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RGB_INTEGER: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_RGBA_INTEGER: | ||
case GL_RGB_INTEGER: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
case GL_RG_INTEGER: | ||
switch (framebufferFormat) | ||
{ | ||
case GL_RGBA_INTEGER: | ||
case GL_RGB_INTEGER: | ||
case GL_RG_INTEGER: | ||
return true; | ||
default: | ||
break; | ||
} | ||
break; | ||
|
||
default: | ||
break; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
} // namespace gl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.