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

Side by Side Diff: src/gpu/vk/GrVkCaps.h

Issue 2363773006: Add command buffer submits before copy calls in vulkan. (Closed)
Patch Set: change submit check to a cap 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
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrVkCaps_DEFINED 8 #ifndef GrVkCaps_DEFINED
9 #define GrVkCaps_DEFINED 9 #define GrVkCaps_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 bool allowInitializationErrorOnTearDown() const { 69 bool allowInitializationErrorOnTearDown() const {
70 return fAllowInitializationErrorOnTearDown; 70 return fAllowInitializationErrorOnTearDown;
71 } 71 }
72 72
73 bool supportsCopiesAsDraws() const { 73 bool supportsCopiesAsDraws() const {
74 return fSupportsCopiesAsDraws; 74 return fSupportsCopiesAsDraws;
75 } 75 }
76 76
77 bool mustSubmitCommandsBeforeCopyOp() const {
78 return fMustSubmitCommandsBeforeCopyOp;
79 }
80
77 /** 81 /**
78 * Returns both a supported and most prefered stencil format to use in draws . 82 * Returns both a supported and most prefered stencil format to use in draws .
79 */ 83 */
80 const StencilFormat& preferedStencilFormat() const { 84 const StencilFormat& preferedStencilFormat() const {
81 return fPreferedStencilFormat; 85 return fPreferedStencilFormat;
82 } 86 }
83 87
84 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); } 88 GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fShaderC aps.get()); }
85 89
86 private: 90 private:
87 enum VkVendor { 91 enum VkVendor {
88 kQualcomm_VkVendor = 20803, 92 kQualcomm_VkVendor = 20803,
93 kNvidia_VkVendor = 4318,
89 }; 94 };
90 95
91 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface, 96 void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInt erface,
92 VkPhysicalDevice device, uint32_t featureFlags, uint32_t extension Flags); 97 VkPhysicalDevice device, uint32_t featureFlags, uint32_t extension Flags);
93 void initGrCaps(const VkPhysicalDeviceProperties&, 98 void initGrCaps(const VkPhysicalDeviceProperties&,
94 const VkPhysicalDeviceMemoryProperties&, 99 const VkPhysicalDeviceMemoryProperties&,
95 uint32_t featureFlags); 100 uint32_t featureFlags);
96 void initGLSLCaps(const VkPhysicalDeviceProperties&, uint32_t featureFlags); 101 void initGLSLCaps(const VkPhysicalDeviceProperties&, uint32_t featureFlags);
97 void initSampleCount(const VkPhysicalDeviceProperties& properties); 102 void initSampleCount(const VkPhysicalDeviceProperties& properties);
98 103
(...skipping 29 matching lines...) Expand all
128 bool fMustDoCopiesFromOrigin; 133 bool fMustDoCopiesFromOrigin;
129 134
130 // On Adreno, there is a bug where vkQueueWaitIdle will once in a while retu rn 135 // On Adreno, there is a bug where vkQueueWaitIdle will once in a while retu rn
131 // VK_ERROR_INITIALIZATION_FAILED instead of the required VK_SUCCESS or VK_D EVICE_LOST. This 136 // VK_ERROR_INITIALIZATION_FAILED instead of the required VK_SUCCESS or VK_D EVICE_LOST. This
132 // flag says we will accept VK_ERROR_INITIALIZATION_FAILED as well. 137 // flag says we will accept VK_ERROR_INITIALIZATION_FAILED as well.
133 bool fAllowInitializationErrorOnTearDown; 138 bool fAllowInitializationErrorOnTearDown;
134 139
135 // Check whether we support using draws for copies. 140 // Check whether we support using draws for copies.
136 bool fSupportsCopiesAsDraws; 141 bool fSupportsCopiesAsDraws;
137 142
143 // On Nvidia there is a current bug where we must the current command buffer before copy
144 // operations or else the copy will not happen. This includes copies, blits, resolves, and copy
145 // as draws.
146 bool fMustSubmitCommandsBeforeCopyOp;
147
138 typedef GrCaps INHERITED; 148 typedef GrCaps INHERITED;
139 }; 149 };
140 150
141 #endif 151 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698