|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by Geoff Lang Modified:
4 years ago Reviewers:
piman CC:
chromium-reviews, piman+watch_chromium.org, Corentin Wallez Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionImplement basic query functionality in the passthrough command buffer.
Store errors in a local set in the passthrough command buffer, allowing us to
track if an error was generated for specific calls that need to be emulated.
BUG=602688
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/73582148251d24005ee3ab08fcdb75757ae9fb9d
Cr-Commit-Position: refs/heads/master@{#433858}
Patch Set 1 #Patch Set 2 #
Total comments: 2
Patch Set 3 : rebase #
Messages
Total messages: 34 (24 generated)
Description was changed from ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 ========== to ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was checked by geofflang@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by geofflang@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by geofflang@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
geofflang@chromium.org changed reviewers: + piman@chromium.org
PTAL. I added my own query tracking instead of using code from the QueryManager because most of the query types will be handled by the driver and I don't need to support the pause/resume logic.
Description was changed from ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
lgtm https://codereview.chromium.org/2502423003/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h (right): https://codereview.chromium.org/2502423003/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h:317: std::unordered_map<GLuint, QueryInfo> query_info_map_; nit: any reason to use the service id to index here? If using the client ids I think it would save a few map lookups.
https://codereview.chromium.org/2502423003/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h (right): https://codereview.chromium.org/2502423003/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h:317: std::unordered_map<GLuint, QueryInfo> query_info_map_; On 2016/11/18 19:32:09, piman wrote: > nit: any reason to use the service id to index here? If using the client ids I > think it would save a few map lookups. I found it needed the same number of lookups because the service ID was always needed at the same time. I'd like to merge the two maps though, no technical reason why the service id and and query type can't be stored in the same struct but the ClientServiceMap class can't handle that yet.
The CQ bit was checked by geofflang@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for
gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h:
While running git apply --index -p1;
error: patch failed:
gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h:241
error: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h: patch does
not apply
Patch: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
index
6c3a5bdc37440d15795ece11cbfa8e58cbfb17ad..d9a47aacaad6b9ab2ab6c7b3a1da67c28e57efcd
100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
@@ -241,6 +241,13 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder {
private:
void BuildExtensionsString();
+ void InsertError(GLenum error, const std::string& message);
+ GLenum PopError();
+ bool FlushErrors();
+
+ bool IsEmulatedQueryTarget(GLenum target) const;
+ error::Error ProcessQueries(bool did_finish);
+
int commands_to_process_;
DebugMarkerManager debug_marker_manager_;
@@ -303,6 +310,33 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder {
size_t active_texture_unit_;
std::vector<GLuint> bound_textures_;
+ // Track the service-id to type of all queries for validation
+ struct QueryInfo {
+ GLenum type = GL_NONE;
+ };
+ std::unordered_map<GLuint, QueryInfo> query_info_map_;
+
+ // All queries that are waiting for their results to be ready
+ struct PendingQuery {
+ GLenum target = GL_NONE;
+ GLuint service_id = 0;
+
+ int32_t shm_id = 0;
+ uint32_t shm_offset = 0;
+ base::subtle::Atomic32 submit_count = 0;
+ };
+ std::deque<PendingQuery> pending_queries_;
+
+ // Currently active queries
+ struct ActiveQuery {
+ GLuint service_id = 0;
+ int32_t shm_id = 0;
+ uint32_t shm_offset = 0;
+ };
+ std::unordered_map<GLenum, ActiveQuery> active_queries_;
+
+ std::set<GLenum> errors_;
+
std::vector<std::string> emulated_extensions_;
std::string extension_string_;
The CQ bit was checked by geofflang@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from piman@chromium.org Link to the patchset: https://codereview.chromium.org/2502423003/#ps40001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_optional_gpu_tests_rel on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_optional_...)
The CQ bit was checked by geofflang@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1479825468026880,
"parent_rev": "3ff07af756d7fb92ae3c1e14dd6748643393dc90", "commit_rev":
"399b35c9c61c21d02553d7340e2839728b45dbf8"}
Message was sent while issue was closed.
Description was changed from ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implement basic query functionality in the passthrough command buffer. Store errors in a local set in the passthrough command buffer, allowing us to track if an error was generated for specific calls that need to be emulated. BUG=602688 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/73582148251d24005ee3ab08fcdb75757ae9fb9d Cr-Commit-Position: refs/heads/master@{#433858} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/73582148251d24005ee3ab08fcdb75757ae9fb9d Cr-Commit-Position: refs/heads/master@{#433858} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
