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

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

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: Created 5 years, 3 months 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 5256 matching lines...) Expand 10 before | Expand all | Expand 10 after
5267 5267
5268 TEST_F(GLES2FormatTest, BlendBarrierKHR) { 5268 TEST_F(GLES2FormatTest, BlendBarrierKHR) {
5269 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>(); 5269 cmds::BlendBarrierKHR& cmd = *GetBufferAs<cmds::BlendBarrierKHR>();
5270 void* next_cmd = cmd.Set(&cmd); 5270 void* next_cmd = cmd.Set(&cmd);
5271 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId), 5271 EXPECT_EQ(static_cast<uint32_t>(cmds::BlendBarrierKHR::kCmdId),
5272 cmd.header.command); 5272 cmd.header.command);
5273 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 5273 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5274 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 5274 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5275 } 5275 }
5276 5276
5277 TEST_F(GLES2FormatTest, BindFragDataLocationIndexedEXTBucket) {
5278 cmds::BindFragDataLocationIndexedEXTBucket& cmd =
5279 *GetBufferAs<cmds::BindFragDataLocationIndexedEXTBucket>();
5280 void* next_cmd =
5281 cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12),
5282 static_cast<GLuint>(13), static_cast<uint32_t>(14));
5283 EXPECT_EQ(
5284 static_cast<uint32_t>(cmds::BindFragDataLocationIndexedEXTBucket::kCmdId),
5285 cmd.header.command);
5286 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5287 EXPECT_EQ(static_cast<GLuint>(11), cmd.program);
5288 EXPECT_EQ(static_cast<GLuint>(12), cmd.colorNumber);
5289 EXPECT_EQ(static_cast<GLuint>(13), cmd.index);
5290 EXPECT_EQ(static_cast<uint32_t>(14), cmd.name_bucket_id);
5291 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5292 }
5293
5294 TEST_F(GLES2FormatTest, BindFragDataLocationEXTBucket) {
5295 cmds::BindFragDataLocationEXTBucket& cmd =
5296 *GetBufferAs<cmds::BindFragDataLocationEXTBucket>();
5297 void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
5298 static_cast<GLuint>(12), static_cast<uint32_t>(13));
5299 EXPECT_EQ(static_cast<uint32_t>(cmds::BindFragDataLocationEXTBucket::kCmdId),
5300 cmd.header.command);
5301 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5302 EXPECT_EQ(static_cast<GLuint>(11), cmd.program);
5303 EXPECT_EQ(static_cast<GLuint>(12), cmd.colorNumber);
5304 EXPECT_EQ(static_cast<uint32_t>(13), cmd.name_bucket_id);
5305 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5306 }
5307
5308 TEST_F(GLES2FormatTest, GetFragDataIndexEXT) {
5309 cmds::GetFragDataIndexEXT& cmd = *GetBufferAs<cmds::GetFragDataIndexEXT>();
5310 void* next_cmd =
5311 cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<uint32_t>(12),
5312 static_cast<uint32_t>(13), static_cast<uint32_t>(14));
5313 EXPECT_EQ(static_cast<uint32_t>(cmds::GetFragDataIndexEXT::kCmdId),
5314 cmd.header.command);
5315 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5316 EXPECT_EQ(static_cast<GLuint>(11), cmd.program);
5317 EXPECT_EQ(static_cast<uint32_t>(12), cmd.name_bucket_id);
5318 EXPECT_EQ(static_cast<uint32_t>(13), cmd.index_shm_id);
5319 EXPECT_EQ(static_cast<uint32_t>(14), cmd.index_shm_offset);
5320 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5321 }
5322
5277 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 5323 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698