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

Side by Side Diff: gpu/command_buffer/service/texture_manager.h

Issue 2421823002: Add workaround for glTex(Sub)Image3D on Intel Macs (Closed)
Patch Set: rebase and fix a nit issue 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 : tex_image_failed(false), 703 : tex_image_failed(false),
704 texture_upload_count(0), 704 texture_upload_count(0),
705 texsubimage_faster_than_teximage( 705 texsubimage_faster_than_teximage(
706 workarounds.texsubimage_faster_than_teximage), 706 workarounds.texsubimage_faster_than_teximage),
707 force_cube_map_positive_x_allocation( 707 force_cube_map_positive_x_allocation(
708 workarounds.force_cube_map_positive_x_allocation), 708 workarounds.force_cube_map_positive_x_allocation),
709 force_cube_complete(workarounds.force_cube_complete), 709 force_cube_complete(workarounds.force_cube_complete),
710 unpack_alignment_workaround_with_unpack_buffer( 710 unpack_alignment_workaround_with_unpack_buffer(
711 workarounds.unpack_alignment_workaround_with_unpack_buffer), 711 workarounds.unpack_alignment_workaround_with_unpack_buffer),
712 unpack_overlapping_rows_separately_unpack_buffer( 712 unpack_overlapping_rows_separately_unpack_buffer(
713 workarounds.unpack_overlapping_rows_separately_unpack_buffer) {} 713 workarounds.unpack_overlapping_rows_separately_unpack_buffer),
714 unpack_image_height_workaround_with_unpack_buffer(
715 workarounds.unpack_image_height_workaround_with_unpack_buffer) {}
714 716
715 // This indicates all the following texSubImage*D calls that are part of the 717 // This indicates all the following texSubImage*D calls that are part of the
716 // failed texImage*D call should be ignored. The client calls have a lock 718 // failed texImage*D call should be ignored. The client calls have a lock
717 // around them, so it will affect only a single texImage*D + texSubImage*D 719 // around them, so it will affect only a single texImage*D + texSubImage*D
718 // group. 720 // group.
719 bool tex_image_failed; 721 bool tex_image_failed;
720 722
721 // Command buffer stats. 723 // Command buffer stats.
722 int texture_upload_count; 724 int texture_upload_count;
723 base::TimeDelta total_texture_upload_time; 725 base::TimeDelta total_texture_upload_time;
724 726
725 bool texsubimage_faster_than_teximage; 727 bool texsubimage_faster_than_teximage;
726 bool force_cube_map_positive_x_allocation; 728 bool force_cube_map_positive_x_allocation;
727 bool force_cube_complete; 729 bool force_cube_complete;
728 bool unpack_alignment_workaround_with_unpack_buffer; 730 bool unpack_alignment_workaround_with_unpack_buffer;
729 bool unpack_overlapping_rows_separately_unpack_buffer; 731 bool unpack_overlapping_rows_separately_unpack_buffer;
732 bool unpack_image_height_workaround_with_unpack_buffer;
730 }; 733 };
731 734
732 // This class keeps track of the textures and their sizes so we can do NPOT and 735 // This class keeps track of the textures and their sizes so we can do NPOT and
733 // texture complete checking. 736 // texture complete checking.
734 // 737 //
735 // NOTE: To support shared resources an instance of this class will need to be 738 // NOTE: To support shared resources an instance of this class will need to be
736 // shared by multiple GLES2Decoders. 739 // shared by multiple GLES2Decoders.
737 class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { 740 class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider {
738 public: 741 public:
739 class GPU_EXPORT DestructionObserver { 742 class GPU_EXPORT DestructionObserver {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 void DoTexSubImageWithAlignmentWorkaround( 1168 void DoTexSubImageWithAlignmentWorkaround(
1166 DecoderTextureState* texture_state, 1169 DecoderTextureState* texture_state,
1167 ContextState* state, 1170 ContextState* state,
1168 const DoTexSubImageArguments& args); 1171 const DoTexSubImageArguments& args);
1169 1172
1170 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state, 1173 void DoTexSubImageRowByRowWorkaround(DecoderTextureState* texture_state,
1171 ContextState* state, 1174 ContextState* state,
1172 const DoTexSubImageArguments& args, 1175 const DoTexSubImageArguments& args,
1173 const PixelStoreParams& unpack_params); 1176 const PixelStoreParams& unpack_params);
1174 1177
1178 void DoTexSubImageLayerByLayerWorkaround(
1179 DecoderTextureState* texture_state,
1180 ContextState* state,
1181 const DoTexSubImageArguments& args,
1182 const PixelStoreParams& unpack_params);
1183
1175 void DoCubeMapWorkaround( 1184 void DoCubeMapWorkaround(
1176 DecoderTextureState* texture_state, 1185 DecoderTextureState* texture_state,
1177 ContextState* state, 1186 ContextState* state,
1178 DecoderFramebufferState* framebuffer_state, 1187 DecoderFramebufferState* framebuffer_state,
1179 TextureRef* texture_ref, 1188 TextureRef* texture_ref,
1180 const char* function_name, 1189 const char* function_name,
1181 const DoTexImageArguments& args); 1190 const DoTexImageArguments& args);
1182 1191
1183 void StartTracking(TextureRef* texture); 1192 void StartTracking(TextureRef* texture);
1184 void StopTracking(TextureRef* texture); 1193 void StopTracking(TextureRef* texture);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 private: 1265 private:
1257 DecoderTextureState* texture_state_; 1266 DecoderTextureState* texture_state_;
1258 base::TimeTicks begin_time_; 1267 base::TimeTicks begin_time_;
1259 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 1268 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
1260 }; 1269 };
1261 1270
1262 } // namespace gles2 1271 } // namespace gles2
1263 } // namespace gpu 1272 } // namespace gpu
1264 1273
1265 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 1274 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698