Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_test_autogen.h

Issue 1236053003: texture mipmap level is not zero-only in ES 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 1011 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
1012 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); 1012 EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
1013 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); 1013 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment);
1014 EXPECT_EQ(static_cast<GLenum>(13), cmd.renderbuffertarget); 1014 EXPECT_EQ(static_cast<GLenum>(13), cmd.renderbuffertarget);
1015 EXPECT_EQ(static_cast<GLuint>(14), cmd.renderbuffer); 1015 EXPECT_EQ(static_cast<GLuint>(14), cmd.renderbuffer);
1016 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 1016 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
1017 } 1017 }
1018 1018
1019 TEST_F(GLES2FormatTest, FramebufferTexture2D) { 1019 TEST_F(GLES2FormatTest, FramebufferTexture2D) {
1020 cmds::FramebufferTexture2D& cmd = *GetBufferAs<cmds::FramebufferTexture2D>(); 1020 cmds::FramebufferTexture2D& cmd = *GetBufferAs<cmds::FramebufferTexture2D>();
1021 void* next_cmd = 1021 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11),
1022 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12), 1022 static_cast<GLenum>(12), static_cast<GLenum>(13),
1023 static_cast<GLenum>(13), static_cast<GLuint>(14)); 1023 static_cast<GLuint>(14), static_cast<GLint>(15));
1024 EXPECT_EQ(static_cast<uint32_t>(cmds::FramebufferTexture2D::kCmdId), 1024 EXPECT_EQ(static_cast<uint32_t>(cmds::FramebufferTexture2D::kCmdId),
1025 cmd.header.command); 1025 cmd.header.command);
1026 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 1026 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
1027 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); 1027 EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
1028 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); 1028 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment);
1029 EXPECT_EQ(static_cast<GLenum>(13), cmd.textarget); 1029 EXPECT_EQ(static_cast<GLenum>(13), cmd.textarget);
1030 EXPECT_EQ(static_cast<GLuint>(14), cmd.texture); 1030 EXPECT_EQ(static_cast<GLuint>(14), cmd.texture);
1031 EXPECT_EQ(static_cast<GLint>(15), cmd.level);
1031 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 1032 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
1032 } 1033 }
1033 1034
1034 TEST_F(GLES2FormatTest, FramebufferTextureLayer) { 1035 TEST_F(GLES2FormatTest, FramebufferTextureLayer) {
1035 cmds::FramebufferTextureLayer& cmd = 1036 cmds::FramebufferTextureLayer& cmd =
1036 *GetBufferAs<cmds::FramebufferTextureLayer>(); 1037 *GetBufferAs<cmds::FramebufferTextureLayer>();
1037 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), 1038 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11),
1038 static_cast<GLenum>(12), static_cast<GLuint>(13), 1039 static_cast<GLenum>(12), static_cast<GLuint>(13),
1039 static_cast<GLint>(14), static_cast<GLint>(15)); 1040 static_cast<GLint>(14), static_cast<GLint>(15));
1040 EXPECT_EQ(static_cast<uint32_t>(cmds::FramebufferTextureLayer::kCmdId), 1041 EXPECT_EQ(static_cast<uint32_t>(cmds::FramebufferTextureLayer::kCmdId),
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
3689 EXPECT_EQ(static_cast<GLsizei>(12), cmd.samples); 3690 EXPECT_EQ(static_cast<GLsizei>(12), cmd.samples);
3690 EXPECT_EQ(static_cast<GLenum>(13), cmd.internalformat); 3691 EXPECT_EQ(static_cast<GLenum>(13), cmd.internalformat);
3691 EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); 3692 EXPECT_EQ(static_cast<GLsizei>(14), cmd.width);
3692 EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); 3693 EXPECT_EQ(static_cast<GLsizei>(15), cmd.height);
3693 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 3694 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
3694 } 3695 }
3695 3696
3696 TEST_F(GLES2FormatTest, FramebufferTexture2DMultisampleEXT) { 3697 TEST_F(GLES2FormatTest, FramebufferTexture2DMultisampleEXT) {
3697 cmds::FramebufferTexture2DMultisampleEXT& cmd = 3698 cmds::FramebufferTexture2DMultisampleEXT& cmd =
3698 *GetBufferAs<cmds::FramebufferTexture2DMultisampleEXT>(); 3699 *GetBufferAs<cmds::FramebufferTexture2DMultisampleEXT>();
3699 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), 3700 void* next_cmd =
3700 static_cast<GLenum>(12), static_cast<GLenum>(13), 3701 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLenum>(12),
3701 static_cast<GLuint>(14), static_cast<GLsizei>(15)); 3702 static_cast<GLenum>(13), static_cast<GLuint>(14),
3703 static_cast<GLint>(15), static_cast<GLsizei>(16));
3702 EXPECT_EQ( 3704 EXPECT_EQ(
3703 static_cast<uint32_t>(cmds::FramebufferTexture2DMultisampleEXT::kCmdId), 3705 static_cast<uint32_t>(cmds::FramebufferTexture2DMultisampleEXT::kCmdId),
3704 cmd.header.command); 3706 cmd.header.command);
3705 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 3707 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
3706 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); 3708 EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
3707 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment); 3709 EXPECT_EQ(static_cast<GLenum>(12), cmd.attachment);
3708 EXPECT_EQ(static_cast<GLenum>(13), cmd.textarget); 3710 EXPECT_EQ(static_cast<GLenum>(13), cmd.textarget);
3709 EXPECT_EQ(static_cast<GLuint>(14), cmd.texture); 3711 EXPECT_EQ(static_cast<GLuint>(14), cmd.texture);
3710 EXPECT_EQ(static_cast<GLsizei>(15), cmd.samples); 3712 EXPECT_EQ(static_cast<GLint>(15), cmd.level);
3713 EXPECT_EQ(static_cast<GLsizei>(16), cmd.samples);
3711 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 3714 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
3712 } 3715 }
3713 3716
3714 TEST_F(GLES2FormatTest, TexStorage2DEXT) { 3717 TEST_F(GLES2FormatTest, TexStorage2DEXT) {
3715 cmds::TexStorage2DEXT& cmd = *GetBufferAs<cmds::TexStorage2DEXT>(); 3718 cmds::TexStorage2DEXT& cmd = *GetBufferAs<cmds::TexStorage2DEXT>();
3716 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11), 3719 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11),
3717 static_cast<GLsizei>(12), static_cast<GLenum>(13), 3720 static_cast<GLsizei>(12), static_cast<GLenum>(13),
3718 static_cast<GLsizei>(14), static_cast<GLsizei>(15)); 3721 static_cast<GLsizei>(14), static_cast<GLsizei>(15));
3719 EXPECT_EQ(static_cast<uint32_t>(cmds::TexStorage2DEXT::kCmdId), 3722 EXPECT_EQ(static_cast<uint32_t>(cmds::TexStorage2DEXT::kCmdId),
3720 cmd.header.command); 3723 cmd.header.command);
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
5277 *GetBufferAs<cmds::ApplyScreenSpaceAntialiasingCHROMIUM>(); 5280 *GetBufferAs<cmds::ApplyScreenSpaceAntialiasingCHROMIUM>();
5278 void* next_cmd = cmd.Set(&cmd); 5281 void* next_cmd = cmd.Set(&cmd);
5279 EXPECT_EQ( 5282 EXPECT_EQ(
5280 static_cast<uint32_t>(cmds::ApplyScreenSpaceAntialiasingCHROMIUM::kCmdId), 5283 static_cast<uint32_t>(cmds::ApplyScreenSpaceAntialiasingCHROMIUM::kCmdId),
5281 cmd.header.command); 5284 cmd.header.command);
5282 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 5285 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5283 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 5286 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5284 } 5287 }
5285 5288
5286 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 5289 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698