blob: 40f100a78772e8e9b2cea5d159d0211c386a31c3 [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
shannon.woods%transgaming.com@gtempaccount.com3b57b4f2013-04-13 03:28:29 +00002// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00003// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// Framebuffer.h: Defines the gl::Framebuffer class. Implements GL framebuffer
8// objects and related functionality. [OpenGL ES 2.0.24] section 4.4 page 105.
9
Geoff Lang0a73dd82014-11-19 16:18:08 -050010#ifndef LIBANGLE_FRAMEBUFFER_H_
11#define LIBANGLE_FRAMEBUFFER_H_
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000012
Jamie Madill7147f012015-03-05 15:41:40 -050013#include <vector>
Jamie Madillce20c7f2014-09-03 11:56:29 -040014
Jamie Madill362876b2016-06-16 14:46:59 -040015#include "common/Optional.h"
alokp@chromium.orgea0e1af2010-03-22 19:33:14 +000016#include "common/angleutils.h"
Jamie Madill7147f012015-03-05 15:41:40 -050017#include "libANGLE/Constants.h"
Geoff Lang70d0f492015-12-10 17:45:46 -050018#include "libANGLE/Debug.h"
Jamie Madill7147f012015-03-05 15:41:40 -050019#include "libANGLE/Error.h"
Jamie Madill2d06b732015-04-20 12:53:28 -040020#include "libANGLE/FramebufferAttachment.h"
Jamie Madill7147f012015-03-05 15:41:40 -050021#include "libANGLE/RefCountObject.h"
Jamie Madill362876b2016-06-16 14:46:59 -040022#include "libANGLE/signal_utils.h"
Geoff Lang64f23f62014-09-10 14:40:12 -040023
daniel@transgaming.com16418b12012-11-28 19:32:22 +000024namespace rx
25{
Jamie Madill7aea7e02016-05-10 10:39:45 -040026class GLImplFactory;
Geoff Langda88add2014-12-01 10:22:01 -050027class FramebufferImpl;
Jamie Madilld1405e52015-03-05 15:41:39 -050028class RenderbufferImpl;
Corentin Wallez37c39792015-08-20 14:19:46 -040029class SurfaceImpl;
Jamie Madilld1405e52015-03-05 15:41:39 -050030}
31
32namespace egl
33{
Jamie Madill6c1f6712017-02-14 19:08:04 -050034class Display;
Jamie Madilld1405e52015-03-05 15:41:39 -050035class Surface;
daniel@transgaming.com16418b12012-11-28 19:32:22 +000036}
37
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000038namespace gl
39{
Jamie Madill1b94d432015-08-07 13:23:23 -040040class Context;
Jamie Madilldd43e6c2017-03-24 14:18:49 -040041class ContextState;
Jamie Madill48ef11b2016-04-27 15:21:52 -040042class Framebuffer;
Geoff Langab75a052014-10-15 12:56:37 -040043class Renderbuffer;
Geoff Langb04dc822014-12-01 12:02:02 -050044class State;
Jamie Madilld1405e52015-03-05 15:41:39 -050045class Texture;
46class TextureCapsMap;
Jamie Madilldd43e6c2017-03-24 14:18:49 -040047class ValidationContext;
Jamie Madilld1405e52015-03-05 15:41:39 -050048struct Caps;
Jamie Madilld1405e52015-03-05 15:41:39 -050049struct Extensions;
50struct ImageIndex;
Geoff Lang9ad4bda2014-12-01 11:03:09 -050051struct Rectangle;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000052
Jamie Madill48ef11b2016-04-27 15:21:52 -040053class FramebufferState final : angle::NonCopyable
54{
55 public:
56 FramebufferState();
57 explicit FramebufferState(const Caps &caps);
58 ~FramebufferState();
59
60 const std::string &getLabel();
61
Geoff Lang4b7f12b2016-06-21 16:47:07 -040062 const FramebufferAttachment *getAttachment(GLenum attachment) const;
Jamie Madill48ef11b2016-04-27 15:21:52 -040063 const FramebufferAttachment *getReadAttachment() const;
Jamie Madill7b57b9d2017-01-13 09:33:38 -050064 const FramebufferAttachment *getFirstNonNullAttachment() const;
Jamie Madill48ef11b2016-04-27 15:21:52 -040065 const FramebufferAttachment *getFirstColorAttachment() const;
66 const FramebufferAttachment *getDepthOrStencilAttachment() const;
Corentin Wallezb1d0a2552016-12-19 16:15:54 -050067 const FramebufferAttachment *getStencilOrDepthStencilAttachment() const;
Jamie Madill48ef11b2016-04-27 15:21:52 -040068 const FramebufferAttachment *getColorAttachment(size_t colorAttachment) const;
69 const FramebufferAttachment *getDepthAttachment() const;
70 const FramebufferAttachment *getStencilAttachment() const;
71 const FramebufferAttachment *getDepthStencilAttachment() const;
72
73 const std::vector<GLenum> &getDrawBufferStates() const { return mDrawBufferStates; }
Corentin Walleze7557742017-06-01 13:09:57 -040074 DrawBufferMask getEnabledDrawBuffers() const { return mEnabledDrawBuffers; }
Jamie Madill48ef11b2016-04-27 15:21:52 -040075 GLenum getReadBufferState() const { return mReadBufferState; }
76 const std::vector<FramebufferAttachment> &getColorAttachments() const
77 {
78 return mColorAttachments;
79 }
80
81 bool attachmentsHaveSameDimensions() const;
Geoff Langb21e20d2016-07-19 15:35:41 -040082 bool colorAttachmentsAreUniqueImages() const;
Jamie Madill48ef11b2016-04-27 15:21:52 -040083
Geoff Lang4b7f12b2016-06-21 16:47:07 -040084 const FramebufferAttachment *getDrawBuffer(size_t drawBufferIdx) const;
85 size_t getDrawBufferCount() const;
86
JiangYizhouf7bbc8a2016-11-16 09:57:22 +080087 GLint getDefaultWidth() const { return mDefaultWidth; };
88 GLint getDefaultHeight() const { return mDefaultHeight; };
89 GLint getDefaultSamples() const { return mDefaultSamples; };
90 GLboolean getDefaultFixedSampleLocations() const { return mDefaultFixedSampleLocations; };
91
Jamie Madill9c335862017-07-18 11:51:38 -040092 bool hasDepth() const;
93 bool hasStencil() const;
94
Jamie Madill48ef11b2016-04-27 15:21:52 -040095 private:
96 friend class Framebuffer;
97
98 std::string mLabel;
99
100 std::vector<FramebufferAttachment> mColorAttachments;
101 FramebufferAttachment mDepthAttachment;
102 FramebufferAttachment mStencilAttachment;
103
104 std::vector<GLenum> mDrawBufferStates;
105 GLenum mReadBufferState;
Corentin Walleze7557742017-06-01 13:09:57 -0400106 DrawBufferMask mEnabledDrawBuffers;
JiangYizhouf7bbc8a2016-11-16 09:57:22 +0800107
108 GLint mDefaultWidth;
109 GLint mDefaultHeight;
110 GLint mDefaultSamples;
111 GLboolean mDefaultFixedSampleLocations;
Jamie Madilla02315b2017-02-23 14:14:47 -0500112
113 // It's necessary to store all this extra state so we can restore attachments
114 // when DEPTH_STENCIL/DEPTH/STENCIL is unbound in WebGL 1.
115 FramebufferAttachment mWebGLDepthStencilAttachment;
116 FramebufferAttachment mWebGLDepthAttachment;
117 FramebufferAttachment mWebGLStencilAttachment;
118 bool mWebGLDepthStencilConsistent;
Jamie Madill48ef11b2016-04-27 15:21:52 -0400119};
120
Jamie Madill1e5499d2017-04-05 11:22:16 -0400121using OnAttachmentDirtyBinding = angle::ChannelBinding<>;
Jamie Madill25e297e2017-04-20 17:01:20 -0400122using OnAttachmentDirtyChannel = angle::BroadcastChannel<>;
123using OnAttachmentDirtyReceiver = angle::SignalReceiver<>;
Jamie Madill1e5499d2017-04-05 11:22:16 -0400124
125class Framebuffer final : public LabeledObject, public OnAttachmentDirtyReceiver
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000126{
127 public:
Corentin Wallezccab69d2017-01-27 16:57:15 -0500128 // Constructor to build application-defined framebuffers
Jamie Madill7aea7e02016-05-10 10:39:45 -0400129 Framebuffer(const Caps &caps, rx::GLImplFactory *factory, GLuint id);
Corentin Wallezccab69d2017-01-27 16:57:15 -0500130 // Constructor to build default framebuffers for a surface
Jamie Madill4928b7c2017-06-20 12:57:39 -0400131 Framebuffer(const egl::Display *display, egl::Surface *surface);
Corentin Wallezccab69d2017-01-27 16:57:15 -0500132 // Constructor to build a fake default framebuffer when surfaceless
133 Framebuffer(rx::GLImplFactory *factory);
134
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000135 virtual ~Framebuffer();
Jamie Madill4928b7c2017-06-20 12:57:39 -0400136 void onDestroy(const Context *context);
Jamie Madill6c1f6712017-02-14 19:08:04 -0500137 void destroyDefault(const egl::Display *display);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000138
Geoff Lang70d0f492015-12-10 17:45:46 -0500139 void setLabel(const std::string &label) override;
140 const std::string &getLabel() const override;
141
Jamie Madill51f40ec2016-06-15 14:06:00 -0400142 rx::FramebufferImpl *getImplementation() const { return mImpl; }
Geoff Langda88add2014-12-01 10:22:01 -0500143
Shannon Woodsaa2ab7d2014-06-24 17:51:51 -0400144 GLuint id() const { return mId; }
145
Jamie Madilla02315b2017-02-23 14:14:47 -0500146 void setAttachment(const Context *context,
147 GLenum type,
Jamie Madill2d06b732015-04-20 12:53:28 -0400148 GLenum binding,
149 const ImageIndex &textureIndex,
150 FramebufferAttachmentObject *resource);
Martin Radev5dae57b2017-07-14 16:15:55 +0300151 void setAttachmentMultiviewSideBySide(const Context *context,
152 GLenum type,
153 GLenum binding,
154 const ImageIndex &textureIndex,
155 FramebufferAttachmentObject *resource,
156 GLsizei numViews,
157 const GLint *viewportOffsets);
Jamie Madilla02315b2017-02-23 14:14:47 -0500158 void resetAttachment(const Context *context, GLenum binding);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000159
Jamie Madilla02315b2017-02-23 14:14:47 -0500160 void detachTexture(const Context *context, GLuint texture);
161 void detachRenderbuffer(const Context *context, GLuint renderbuffer);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000162
Corentin Wallez37c39792015-08-20 14:19:46 -0400163 const FramebufferAttachment *getColorbuffer(size_t colorAttachment) const;
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400164 const FramebufferAttachment *getDepthbuffer() const;
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400165 const FramebufferAttachment *getStencilbuffer() const;
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400166 const FramebufferAttachment *getDepthStencilBuffer() const;
167 const FramebufferAttachment *getDepthOrStencilbuffer() const;
Corentin Wallezb1d0a2552016-12-19 16:15:54 -0500168 const FramebufferAttachment *getStencilOrDepthStencilAttachment() const;
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400169 const FramebufferAttachment *getReadColorbuffer() const;
shannon.woods%transgaming.com@gtempaccount.comf6863e02013-04-13 03:34:00 +0000170 GLenum getReadColorbufferType() const;
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400171 const FramebufferAttachment *getFirstColorbuffer() const;
Jamie Madill6dd06ea2017-07-19 13:47:55 -0400172 const FramebufferAttachment *getFirstNonNullAttachment() const;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000173
Jamie Madillb6bda4a2015-04-20 12:53:26 -0400174 const FramebufferAttachment *getAttachment(GLenum attachment) const;
Geoff Langc90d73a2013-07-22 16:39:23 -0400175
Geoff Langa15472a2015-08-11 11:48:03 -0400176 size_t getDrawbufferStateCount() const;
177 GLenum getDrawBufferState(size_t drawBuffer) const;
Jamie Madill1fbc59f2016-02-24 15:25:51 -0500178 const std::vector<GLenum> &getDrawBufferStates() const;
Geoff Lang164d54e2014-12-01 10:55:33 -0500179 void setDrawBuffers(size_t count, const GLenum *buffers);
Geoff Langa15472a2015-08-11 11:48:03 -0400180 const FramebufferAttachment *getDrawBuffer(size_t drawBuffer) const;
Geoff Lange0cff192017-05-30 13:04:56 -0400181 GLenum getDrawbufferWriteType(size_t drawBuffer) const;
Geoff Langa15472a2015-08-11 11:48:03 -0400182 bool hasEnabledDrawBuffer() const;
shannon.woods%transgaming.com@gtempaccount.comf30ccc22013-04-13 03:28:36 +0000183
Geoff Lang9dd95802014-12-01 11:12:59 -0500184 GLenum getReadBufferState() const;
185 void setReadBuffer(GLenum buffer);
186
Corentin Wallez37c39792015-08-20 14:19:46 -0400187 size_t getNumColorBuffers() const;
Jamie Madill0df8fe42015-11-24 16:10:24 -0500188 bool hasDepth() const;
shannon.woods%transgaming.com@gtempaccount.com3b57b4f2013-04-13 03:28:29 +0000189 bool hasStencil() const;
Jamie Madill51f40ec2016-06-15 14:06:00 -0400190
shannonwoods@chromium.org24ac8502013-05-30 00:01:37 +0000191 bool usingExtendedDrawBuffers() const;
daniel@transgaming.coma27ff1e2010-08-24 19:20:11 +0000192
Jamie Madill51f40ec2016-06-15 14:06:00 -0400193 // This method calls checkStatus.
Jamie Madilldd43e6c2017-03-24 14:18:49 -0400194 int getSamples(const Context *context);
JiangYizhoubddc46b2016-12-09 09:50:51 +0800195
196 Error getSamplePosition(size_t index, GLfloat *xy) const;
197
JiangYizhouf7bbc8a2016-11-16 09:57:22 +0800198 GLint getDefaultWidth() const;
199 GLint getDefaultHeight() const;
200 GLint getDefaultSamples() const;
201 GLboolean getDefaultFixedSampleLocations() const;
202 void setDefaultWidth(GLint defaultWidth);
203 void setDefaultHeight(GLint defaultHeight);
204 void setDefaultSamples(GLint defaultSamples);
205 void setDefaultFixedSampleLocations(GLboolean defaultFixedSampleLocations);
206
Geoff Lang9aded172017-04-05 11:07:56 -0400207 void invalidateCompletenessCache();
208
Jamie Madilldd43e6c2017-03-24 14:18:49 -0400209 GLenum checkStatus(const Context *context);
210
211 // TODO(jmadill): Remove this kludge.
212 GLenum checkStatus(const ValidationContext *context);
213 int getSamples(const ValidationContext *context);
Jamie Madill51f40ec2016-06-15 14:06:00 -0400214
Jamie Madill9c335862017-07-18 11:51:38 -0400215 // For when we don't want to check completeness in getSamples().
216 int getCachedSamples(const Context *context);
217
Jamie Madill362876b2016-06-16 14:46:59 -0400218 // Helper for checkStatus == GL_FRAMEBUFFER_COMPLETE.
Jamie Madilldd43e6c2017-03-24 14:18:49 -0400219 bool complete(const Context *context);
220 bool cachedComplete() const;
Jamie Madill51f40ec2016-06-15 14:06:00 -0400221
Jamie Madille92a3542014-07-03 10:38:58 -0400222 bool hasValidDepthStencil() const;
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000223
Jamie Madill4928b7c2017-06-20 12:57:39 -0400224 Error discard(const Context *context, size_t count, const GLenum *attachments);
225 Error invalidate(const Context *context, size_t count, const GLenum *attachments);
226 Error invalidateSub(const Context *context,
227 size_t count,
228 const GLenum *attachments,
229 const gl::Rectangle &area);
Jamie Madill400a4412014-08-29 15:46:45 -0400230
Jamie Madillc564c072017-06-01 12:45:42 -0400231 Error clear(const gl::Context *context, GLbitfield mask);
232 Error clearBufferfv(const gl::Context *context,
Jamie Madillc29968b2016-01-20 11:17:23 -0500233 GLenum buffer,
234 GLint drawbuffer,
235 const GLfloat *values);
Jamie Madillc564c072017-06-01 12:45:42 -0400236 Error clearBufferuiv(const gl::Context *context,
Jamie Madillc29968b2016-01-20 11:17:23 -0500237 GLenum buffer,
238 GLint drawbuffer,
239 const GLuint *values);
Jamie Madillc564c072017-06-01 12:45:42 -0400240 Error clearBufferiv(const gl::Context *context,
Jamie Madill9082b982016-04-27 15:21:51 -0400241 GLenum buffer,
242 GLint drawbuffer,
243 const GLint *values);
Jamie Madillc564c072017-06-01 12:45:42 -0400244 Error clearBufferfi(const gl::Context *context,
Jamie Madill1b94d432015-08-07 13:23:23 -0400245 GLenum buffer,
246 GLint drawbuffer,
247 GLfloat depth,
248 GLint stencil);
Geoff Langb04dc822014-12-01 12:02:02 -0500249
Jamie Madill4928b7c2017-06-20 12:57:39 -0400250 GLenum getImplementationColorReadFormat(const Context *context) const;
251 GLenum getImplementationColorReadType(const Context *context) const;
Jamie Madillc564c072017-06-01 12:45:42 -0400252 Error readPixels(const gl::Context *context,
Jamie Madill1b94d432015-08-07 13:23:23 -0400253 const gl::Rectangle &area,
254 GLenum format,
255 GLenum type,
Jamie Madill876429b2017-04-20 15:46:24 -0400256 void *pixels) const;
Geoff Langbce529e2014-12-01 12:48:41 -0500257
Jamie Madillc564c072017-06-01 12:45:42 -0400258 Error blit(const gl::Context *context,
Jamie Madillc29968b2016-01-20 11:17:23 -0500259 const Rectangle &sourceArea,
260 const Rectangle &destArea,
Geoff Lang242468f2015-09-24 14:15:41 -0400261 GLbitfield mask,
Jamie Madill8415b5f2016-04-26 13:41:39 -0400262 GLenum filter);
Geoff Lang54bd5a42014-12-01 12:51:04 -0500263
Jamie Madill1e5499d2017-04-05 11:22:16 -0400264 enum DirtyBitType : uint32_t
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500265 {
266 DIRTY_BIT_COLOR_ATTACHMENT_0,
267 DIRTY_BIT_COLOR_ATTACHMENT_MAX =
268 DIRTY_BIT_COLOR_ATTACHMENT_0 + gl::IMPLEMENTATION_MAX_FRAMEBUFFER_ATTACHMENTS,
269 DIRTY_BIT_DEPTH_ATTACHMENT = DIRTY_BIT_COLOR_ATTACHMENT_MAX,
270 DIRTY_BIT_STENCIL_ATTACHMENT,
271 DIRTY_BIT_DRAW_BUFFERS,
272 DIRTY_BIT_READ_BUFFER,
JiangYizhouf7bbc8a2016-11-16 09:57:22 +0800273 DIRTY_BIT_DEFAULT_WIDTH,
274 DIRTY_BIT_DEFAULT_HEIGHT,
275 DIRTY_BIT_DEFAULT_SAMPLES,
276 DIRTY_BIT_DEFAULT_FIXED_SAMPLE_LOCATIONS,
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500277 DIRTY_BIT_UNKNOWN,
JiangYizhouf7bbc8a2016-11-16 09:57:22 +0800278 DIRTY_BIT_MAX = DIRTY_BIT_UNKNOWN
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500279 };
280
Jamie Madill6de51852017-04-12 09:53:01 -0400281 typedef angle::BitSet<DIRTY_BIT_MAX> DirtyBits;
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500282 bool hasAnyDirtyBit() const { return mDirtyBits.any(); }
283
Jamie Madilldd43e6c2017-03-24 14:18:49 -0400284 void syncState(const Context *context);
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500285
Jamie Madill362876b2016-06-16 14:46:59 -0400286 // angle::SignalReceiver implementation
Jamie Madill1e5499d2017-04-05 11:22:16 -0400287 void signal(uint32_t token) override;
Jamie Madill362876b2016-06-16 14:46:59 -0400288
Jamie Madilla4595b82017-01-11 17:36:34 -0500289 bool formsRenderingFeedbackLoopWith(const State &state) const;
Jamie Madillfd3dd432017-02-02 19:59:59 -0500290 bool formsCopyingFeedbackLoopWith(GLuint copyTextureID,
291 GLint copyTextureLevel,
292 GLint copyTextureLayer) const;
Jamie Madilla4595b82017-01-11 17:36:34 -0500293
Jamie Madill362876b2016-06-16 14:46:59 -0400294 private:
Jamie Madilla02315b2017-02-23 14:14:47 -0500295 void detachResourceById(const Context *context, GLenum resourceType, GLuint resourceId);
Jamie Madill4928b7c2017-06-20 12:57:39 -0400296 void detachMatchingAttachment(const Context *context,
297 FramebufferAttachment *attachment,
Jamie Madill362876b2016-06-16 14:46:59 -0400298 GLenum matchType,
299 GLuint matchId,
300 size_t dirtyBit);
Jamie Madilldd43e6c2017-03-24 14:18:49 -0400301 GLenum checkStatusImpl(const Context *context);
Martin Radev5dae57b2017-07-14 16:15:55 +0300302 void setAttachment(const Context *context,
303 GLenum type,
304 GLenum binding,
305 const ImageIndex &textureIndex,
306 FramebufferAttachmentObject *resource,
307 GLsizei numViews,
308 GLuint baseViewIndex,
309 GLenum multiviewLayout,
310 const GLint *viewportOffsets);
311 void commitWebGL1DepthStencilIfConsistent(const Context *context,
312 GLsizei numViews,
313 GLuint baseViewIndex,
314 GLenum multiviewLayout,
315 const GLint *viewportOffsets);
Jamie Madill4928b7c2017-06-20 12:57:39 -0400316 void setAttachmentImpl(const Context *context,
317 GLenum type,
Jamie Madilla02315b2017-02-23 14:14:47 -0500318 GLenum binding,
319 const ImageIndex &textureIndex,
Martin Radev5dae57b2017-07-14 16:15:55 +0300320 FramebufferAttachmentObject *resource,
321 GLsizei numViews,
322 GLuint baseViewIndex,
323 GLenum multiviewLayout,
324 const GLint *viewportOffsets);
Jamie Madill4928b7c2017-06-20 12:57:39 -0400325 void updateAttachment(const Context *context,
326 FramebufferAttachment *attachment,
Jamie Madillb8126692017-04-05 11:22:17 -0400327 size_t dirtyBit,
328 OnAttachmentDirtyBinding *onDirtyBinding,
329 GLenum type,
330 GLenum binding,
331 const ImageIndex &textureIndex,
Martin Radev5dae57b2017-07-14 16:15:55 +0300332 FramebufferAttachmentObject *resource,
333 GLsizei numViews,
334 GLuint baseViewIndex,
335 GLenum multiviewLayout,
336 const GLint *viewportOffsets);
Geoff Lang528ce3c2014-12-01 10:44:07 -0500337
Jamie Madill48ef11b2016-04-27 15:21:52 -0400338 FramebufferState mState;
Geoff Langda88add2014-12-01 10:22:01 -0500339 rx::FramebufferImpl *mImpl;
Shannon Woodsaa2ab7d2014-06-24 17:51:51 -0400340 GLuint mId;
Jamie Madill60ec6ea2016-01-22 15:27:19 -0500341
Jamie Madill362876b2016-06-16 14:46:59 -0400342 Optional<GLenum> mCachedStatus;
Jamie Madill1e5499d2017-04-05 11:22:16 -0400343 std::vector<OnAttachmentDirtyBinding> mDirtyColorAttachmentBindings;
344 OnAttachmentDirtyBinding mDirtyDepthAttachmentBinding;
345 OnAttachmentDirtyBinding mDirtyStencilAttachmentBinding;
Jamie Madill362876b2016-06-16 14:46:59 -0400346
347 DirtyBits mDirtyBits;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000348};
daniel@transgaming.com9ecb9f92010-07-28 19:21:12 +0000349
Jamie Madill362876b2016-06-16 14:46:59 -0400350} // namespace gl
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000351
Jamie Madill231c7f52017-04-26 13:45:37 -0400352#endif // LIBANGLE_FRAMEBUFFER_H_