summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/framebuffer.h')
-rw-r--r--src/mesa/main/framebuffer.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index d02b86f20d9..ca286e9a992 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -76,6 +76,34 @@ _mesa_scissor_bounding_box(const struct gl_context *ctx,
const struct gl_framebuffer *buffer,
unsigned idx, int *bbox);
+static inline GLuint
+_mesa_geometric_width(const struct gl_framebuffer *buffer)
+{
+ return buffer->_HasAttachments ?
+ buffer->Width : buffer->DefaultGeometry.Width;
+}
+
+static inline GLuint
+_mesa_geometric_height(const struct gl_framebuffer *buffer)
+{
+ return buffer->_HasAttachments ?
+ buffer->Height : buffer->DefaultGeometry.Height;
+}
+
+static inline GLuint
+_mesa_geometric_samples(const struct gl_framebuffer *buffer)
+{
+ return buffer->_HasAttachments ?
+ buffer->Visual.samples : buffer->DefaultGeometry.NumSamples;
+}
+
+static inline GLuint
+_mesa_geometric_layers(const struct gl_framebuffer *buffer)
+{
+ return buffer->_HasAttachments ?
+ buffer->MaxNumLayers : buffer->DefaultGeometry.Layers;
+}
+
extern void
_mesa_update_draw_buffer_bounds(struct gl_context *ctx,
struct gl_framebuffer *drawFb);