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

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

Issue 2611403002: Fix a bug in drawBuffers optimization. (Closed)
Patch Set: Created 3 years, 11 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_FRAMEBUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Checks if a draw buffer's format and its corresponding fragment shader 187 // Checks if a draw buffer's format and its corresponding fragment shader
188 // output's type are compatible, i.e., a signed integer typed variable is 188 // output's type are compatible, i.e., a signed integer typed variable is
189 // incompatible with a float or unsigned integer buffer. 189 // incompatible with a float or unsigned integer buffer.
190 // Return false if incompaticle. 190 // Return false if incompaticle.
191 // Otherwise, filter out the draw buffers that are not written to but are not 191 // Otherwise, filter out the draw buffers that are not written to but are not
192 // NONE through DrawBuffers, to be on the safe side. Return true. 192 // NONE through DrawBuffers, to be on the safe side. Return true.
193 // This is applied before a draw call. 193 // This is applied before a draw call.
194 bool ValidateAndAdjustDrawBuffers(uint32_t fragment_output_type_mask, 194 bool ValidateAndAdjustDrawBuffers(uint32_t fragment_output_type_mask,
195 uint32_t fragment_output_written_mask); 195 uint32_t fragment_output_written_mask);
196 196
197 // Filter out the draw buffers that have no images attached but are not NONE
198 // through DrawBuffers, to be on the safe side.
199 // This is applied before a clear call.
200 void AdjustDrawBuffers();
201
197 bool ContainsActiveIntegerAttachments() const; 202 bool ContainsActiveIntegerAttachments() const;
198 203
199 // Return true if any draw buffers has an alpha channel. 204 // Return true if any draw buffers has an alpha channel.
200 bool HasAlphaMRT() const; 205 bool HasAlphaMRT() const;
201 206
202 // Return false if any two active color attachments have different internal 207 // Return false if any two active color attachments have different internal
203 // formats. 208 // formats.
204 bool HasSameInternalFormatsMRT() const; 209 bool HasSameInternalFormatsMRT() const;
205 210
206 void set_read_buffer(GLenum read_buffer) { 211 void set_read_buffer(GLenum read_buffer) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 377
373 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_; 378 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_;
374 379
375 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); 380 DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
376 }; 381 };
377 382
378 } // namespace gles2 383 } // namespace gles2
379 } // namespace gpu 384 } // namespace gpu
380 385
381 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 386 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | gpu/command_buffer/service/framebuffer_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698