summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 21:49:08 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 21:49:08 +0000
commite40d00e8c2b12bf1bede522d03cbf0d0e2c0caec (patch)
treebee0df33615e546c34afc3e2f847d385ac3c9082 /gpu/command_buffer
parent3ae288a3a5c2024afb3c19de64e22cba3962735d (diff)
downloadchromium_src-e40d00e8c2b12bf1bede522d03cbf0d0e2c0caec.zip
chromium_src-e40d00e8c2b12bf1bede522d03cbf0d0e2c0caec.tar.gz
chromium_src-e40d00e8c2b12bf1bede522d03cbf0d0e2c0caec.tar.bz2
GPU service understands size of GL_UNSIGNED_INT pixel data type.
It is needed for the GL_GOOGLE_depth_texture extension. BUG=99860 Review URL: http://codereview.chromium.org/8241020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc1
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_unittest.cc3
2 files changed, 4 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 648dbb1..296d025 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -348,6 +348,7 @@ int BytesPerElement(int type) {
switch (type) {
case GL_FLOAT:
case GL_UNSIGNED_INT_24_8_OES:
+ case GL_UNSIGNED_INT:
return 4;
case GL_HALF_FLOAT_OES:
case GL_UNSIGNED_SHORT:
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
index 1fcc9a8..567e9a6 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
@@ -81,6 +81,9 @@ TEST_F(GLES2UtilTest, ComputeImageDataSizeTypes) {
EXPECT_TRUE(GLES2Util::ComputeImageDataSize(
kWidth, kHeight, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 1, &size));
EXPECT_EQ(kWidth * kHeight * 2, size);
+ EXPECT_TRUE(GLES2Util::ComputeImageDataSize(
+ kWidth, kHeight, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 1, &size));
+ EXPECT_EQ(kWidth * kHeight * 4, size);
}
TEST_F(GLES2UtilTest, ComputeImageDataSizeUnpackAlignment) {