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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc

Issue 2502423003: Implement basic query functionality in the passthrough command buffer. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 namespace gpu { 7 namespace gpu {
8 namespace gles2 { 8 namespace gles2 {
9 9
10 // Custom Handlers 10 // Custom Handlers
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 return error::kNoError; 1126 return error::kNoError;
1127 } 1127 }
1128 1128
1129 error::Error GLES2DecoderPassthroughImpl::HandleQueryCounterEXT( 1129 error::Error GLES2DecoderPassthroughImpl::HandleQueryCounterEXT(
1130 uint32_t immediate_data_size, 1130 uint32_t immediate_data_size,
1131 const volatile void* cmd_data) { 1131 const volatile void* cmd_data) {
1132 const volatile gles2::cmds::QueryCounterEXT& c = 1132 const volatile gles2::cmds::QueryCounterEXT& c =
1133 *static_cast<const volatile gles2::cmds::QueryCounterEXT*>(cmd_data); 1133 *static_cast<const volatile gles2::cmds::QueryCounterEXT*>(cmd_data);
1134 GLuint id = static_cast<GLuint>(c.id); 1134 GLuint id = static_cast<GLuint>(c.id);
1135 GLenum target = static_cast<GLenum>(c.target); 1135 GLenum target = static_cast<GLenum>(c.target);
1136 int32_t sync_shm_id = static_cast<int32_t>(c.sync_data_shm_id);
1137 uint32_t sync_shm_offset = static_cast<uint32_t>(c.sync_data_shm_offset);
1138 uint32_t submit_count = static_cast<GLuint>(c.submit_count);
1136 1139
1137 error::Error error = DoQueryCounterEXT(id, target); 1140 error::Error error =
1141 DoQueryCounterEXT(id, target, sync_shm_id, sync_shm_offset, submit_count);
1138 if (error != error::kNoError) { 1142 if (error != error::kNoError) {
1139 return error; 1143 return error;
1140 } 1144 }
1141 1145
1142 return error::kNoError; 1146 return error::kNoError;
1143 } 1147 }
1144 1148
1145 error::Error GLES2DecoderPassthroughImpl::HandleBeginQueryEXT( 1149 error::Error GLES2DecoderPassthroughImpl::HandleBeginQueryEXT(
1146 uint32_t immediate_data_size, 1150 uint32_t immediate_data_size,
1147 const volatile void* cmd_data) { 1151 const volatile void* cmd_data) {
1148 const volatile gles2::cmds::BeginQueryEXT& c = 1152 const volatile gles2::cmds::BeginQueryEXT& c =
1149 *static_cast<const volatile gles2::cmds::BeginQueryEXT*>(cmd_data); 1153 *static_cast<const volatile gles2::cmds::BeginQueryEXT*>(cmd_data);
1150 GLenum target = static_cast<GLenum>(c.target); 1154 GLenum target = static_cast<GLenum>(c.target);
1151 GLuint id = static_cast<GLuint>(c.id); 1155 GLuint id = static_cast<GLuint>(c.id);
1156 int32_t sync_shm_id = static_cast<int32_t>(c.sync_data_shm_id);
1157 uint32_t sync_shm_offset = static_cast<uint32_t>(c.sync_data_shm_offset);
1152 1158
1153 error::Error error = DoBeginQueryEXT(target, id); 1159 error::Error error =
1160 DoBeginQueryEXT(target, id, sync_shm_id, sync_shm_offset);
1154 if (error != error::kNoError) { 1161 if (error != error::kNoError) {
1155 return error; 1162 return error;
1156 } 1163 }
1157 1164
1158 return error::kNoError; 1165 return error::kNoError;
1159 } 1166 }
1160 1167
1161 error::Error GLES2DecoderPassthroughImpl::HandleEndQueryEXT( 1168 error::Error GLES2DecoderPassthroughImpl::HandleEndQueryEXT(
1162 uint32_t immediate_data_size, 1169 uint32_t immediate_data_size,
1163 const volatile void* cmd_data) { 1170 const volatile void* cmd_data) {
1164 const volatile gles2::cmds::EndQueryEXT& c = 1171 const volatile gles2::cmds::EndQueryEXT& c =
1165 *static_cast<const volatile gles2::cmds::EndQueryEXT*>(cmd_data); 1172 *static_cast<const volatile gles2::cmds::EndQueryEXT*>(cmd_data);
1166 GLenum target = static_cast<GLenum>(c.target); 1173 GLenum target = static_cast<GLenum>(c.target);
1174 uint32_t submit_count = static_cast<GLuint>(c.submit_count);
1167 1175
1168 error::Error error = DoEndQueryEXT(target); 1176 error::Error error = DoEndQueryEXT(target, submit_count);
1169 if (error != error::kNoError) { 1177 if (error != error::kNoError) {
1170 return error; 1178 return error;
1171 } 1179 }
1172 1180
1173 return error::kNoError; 1181 return error::kNoError;
1174 } 1182 }
1175 1183
1176 error::Error GLES2DecoderPassthroughImpl::HandleSetDisjointValueSyncCHROMIUM( 1184 error::Error GLES2DecoderPassthroughImpl::HandleSetDisjointValueSyncCHROMIUM(
1177 uint32_t immediate_data_size, 1185 uint32_t immediate_data_size,
1178 const volatile void* cmd_data) { 1186 const volatile void* cmd_data) {
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case. 2607 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case.
2600 const void* data = GetSharedMemoryAs<const void*>( 2608 const void* data = GetSharedMemoryAs<const void*>(
2601 c.data_shm_id, c.data_shm_offset, image_size); 2609 c.data_shm_id, c.data_shm_offset, image_size);
2602 return DoCompressedTexSubImage3D( 2610 return DoCompressedTexSubImage3D(
2603 target, level, xoffset, yoffset, zoffset, width, height, depth, 2611 target, level, xoffset, yoffset, zoffset, width, height, depth,
2604 format, image_size, data); 2612 format, image_size, data);
2605 } 2613 }
2606 2614
2607 } // namespace gles2 2615 } // namespace gles2
2608 } // namespace gpu 2616 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698