summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common/gles2_cmd_utils.h
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 05:17:15 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 05:17:15 +0000
commit1958e0ef0fe59e392cab9bb351401beeb64e8379 (patch)
tree2dab1d4b2cdbbb50c1c6263b85430988d0ebecdb /gpu/command_buffer/common/gles2_cmd_utils.h
parent9040ad23a3950685b08523d12305d9afcbbc7551 (diff)
downloadchromium_src-1958e0ef0fe59e392cab9bb351401beeb64e8379.zip
chromium_src-1958e0ef0fe59e392cab9bb351401beeb64e8379.tar.gz
chromium_src-1958e0ef0fe59e392cab9bb351401beeb64e8379.tar.bz2
A bunch more GLES2 conformance test fixes.
1) All the glIsXXX functions were wrong 2) unlike buffers, renderbuffers, framebuffers, etc texture 0 is valid. 3) UseProgram accepts 0. 4) make glShaderSource fail if passed a NULL pointer (the spec doesn't say this afaict) TEST=conformance tests BUG=none Review URL: http://codereview.chromium.org/1750005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_utils.h')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index e9ad91a..8099fe2 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -54,6 +54,8 @@ inline bool SafeAddUint32(uint32 a, uint32 b, uint32* dst) {
// Utilties for GLES2 support.
class GLES2Util {
public:
+ static const int kNumFaces = 6;
+
explicit GLES2Util(
int num_compressed_texture_formats)
: num_compressed_texture_formats_(num_compressed_texture_formats) {
@@ -76,6 +78,8 @@ class GLES2Util {
static uint32 GLErrorBitToGLError(uint32 error_bit);
+ static uint32 IndexToGLFaceTarget(int index);
+
private:
int num_compressed_texture_formats_;
};