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

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

Issue 2379203002: implement getBufferSubDataAsync prototype (Closed)
Patch Set: small clarification Created 4 years, 2 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 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 5267 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5268 EXPECT_EQ(static_cast<GLuint>(11), cmd.program); 5268 EXPECT_EQ(static_cast<GLuint>(11), cmd.program);
5269 EXPECT_EQ(static_cast<GLint>(12), cmd.location); 5269 EXPECT_EQ(static_cast<GLint>(12), cmd.location);
5270 EXPECT_EQ(static_cast<GLenum>(13), cmd.genMode); 5270 EXPECT_EQ(static_cast<GLenum>(13), cmd.genMode);
5271 EXPECT_EQ(static_cast<GLint>(14), cmd.components); 5271 EXPECT_EQ(static_cast<GLint>(14), cmd.components);
5272 EXPECT_EQ(static_cast<uint32_t>(15), cmd.coeffs_shm_id); 5272 EXPECT_EQ(static_cast<uint32_t>(15), cmd.coeffs_shm_id);
5273 EXPECT_EQ(static_cast<uint32_t>(16), cmd.coeffs_shm_offset); 5273 EXPECT_EQ(static_cast<uint32_t>(16), cmd.coeffs_shm_offset);
5274 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 5274 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5275 } 5275 }
5276 5276
5277 TEST_F(GLES2FormatTest, GetBufferSubDataAsyncCHROMIUM) {
5278 cmds::GetBufferSubDataAsyncCHROMIUM& cmd =
5279 *GetBufferAs<cmds::GetBufferSubDataAsyncCHROMIUM>();
5280 void* next_cmd =
5281 cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLintptr>(12),
5282 static_cast<GLsizeiptr>(13), static_cast<uint32_t>(14),
5283 static_cast<uint32_t>(15));
5284 EXPECT_EQ(static_cast<uint32_t>(cmds::GetBufferSubDataAsyncCHROMIUM::kCmdId),
5285 cmd.header.command);
5286 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5287 EXPECT_EQ(static_cast<GLenum>(11), cmd.target);
5288 EXPECT_EQ(static_cast<GLintptr>(12), cmd.offset);
5289 EXPECT_EQ(static_cast<GLsizeiptr>(13), cmd.size);
5290 EXPECT_EQ(static_cast<uint32_t>(14), cmd.data_shm_id);
5291 EXPECT_EQ(static_cast<uint32_t>(15), cmd.data_shm_offset);
5292 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5293 }
5294
5277 TEST_F(GLES2FormatTest, CoverageModulationCHROMIUM) { 5295 TEST_F(GLES2FormatTest, CoverageModulationCHROMIUM) {
5278 cmds::CoverageModulationCHROMIUM& cmd = 5296 cmds::CoverageModulationCHROMIUM& cmd =
5279 *GetBufferAs<cmds::CoverageModulationCHROMIUM>(); 5297 *GetBufferAs<cmds::CoverageModulationCHROMIUM>();
5280 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11)); 5298 void* next_cmd = cmd.Set(&cmd, static_cast<GLenum>(11));
5281 EXPECT_EQ(static_cast<uint32_t>(cmds::CoverageModulationCHROMIUM::kCmdId), 5299 EXPECT_EQ(static_cast<uint32_t>(cmds::CoverageModulationCHROMIUM::kCmdId),
5282 cmd.header.command); 5300 cmd.header.command);
5283 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 5301 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5284 EXPECT_EQ(static_cast<GLenum>(11), cmd.components); 5302 EXPECT_EQ(static_cast<GLenum>(11), cmd.components);
5285 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 5303 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5286 } 5304 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
5397 cmd.header.command); 5415 cmd.header.command);
5398 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); 5416 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
5399 EXPECT_EQ(static_cast<GLint>(11), cmd.x); 5417 EXPECT_EQ(static_cast<GLint>(11), cmd.x);
5400 EXPECT_EQ(static_cast<GLint>(12), cmd.y); 5418 EXPECT_EQ(static_cast<GLint>(12), cmd.y);
5401 EXPECT_EQ(static_cast<GLint>(13), cmd.width); 5419 EXPECT_EQ(static_cast<GLint>(13), cmd.width);
5402 EXPECT_EQ(static_cast<GLint>(14), cmd.height); 5420 EXPECT_EQ(static_cast<GLint>(14), cmd.height);
5403 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); 5421 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
5404 } 5422 }
5405 5423
5406 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ 5424 #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/common/gles2_cmd_ids_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698