summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-09-17 10:56:15 -0400
committerIan Romanick <[email protected]>2018-04-26 09:38:51 -0400
commit0b3231966ffcba4188794924f6674cdde1ae2710 (patch)
tree949966b2f92815c9eab68184b7b9e048c16cb184
parentd7ffe3b384f4d1c15a9364768cf405d416522e60 (diff)
radeon: Use _mesa_is_front_buffer_drawing
Signed-off-by: Ian Romanick <[email protected]> Acked-by: Timothy Arceri <[email protected]>
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c21
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c7
4 files changed, 5 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 6e4b4c48808..155d3a392c7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -175,27 +175,6 @@ uint32_t radeonGetAge(radeonContextPtr radeon)
return age;
}
-/**
- * Check if we're about to draw into the front color buffer.
- * If so, set the intel->front_buffer_dirty field to true.
- */
-void
-radeon_check_front_buffer_rendering(struct gl_context *ctx)
-{
- radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- const struct gl_framebuffer *fb = ctx->DrawBuffer;
-
- if (fb->Name == 0) {
- /* drawing to window system buffer */
- if (fb->_NumColorDrawBuffers > 0) {
- if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
- radeon->front_buffer_dirty = GL_TRUE;
- }
- }
- }
-}
-
-
void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index fedaf5063a7..ada49560662 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -37,7 +37,6 @@ radeonReadPixels(struct gl_context * ctx,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels);
-void radeon_check_front_buffer_rendering(struct gl_context *ctx);
static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb)
{
struct radeon_renderbuffer *rrb = (struct radeon_renderbuffer *)rb;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h
index e70e334aba4..efb2e6016b7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -126,7 +126,6 @@ struct __DRIimageRec {
#define radeon_prepare_render r200_radeon_prepare_render
#define radeonUnbindContext r200_radeonUnbindContext
#define radeon_update_renderbuffers r200_radeon_update_renderbuffers
-#define radeon_check_front_buffer_rendering r200_radeon_check_front_buffer_rendering
#define radeonCountStateEmitSize r200_radeonCountStateEmitSize
#define radeon_draw_buffer r200_radeon_draw_buffer
#define radeonDrawBuffer r200_radeonDrawBuffer
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 42f62a0cb7f..648df5cc146 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -44,6 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/texformat.h"
#include "main/renderbuffer.h"
#include "main/samplerobj.h"
+#include "main/framebuffer.h"
#include "swrast/swrast.h"
#include "swrast/s_renderbuffer.h"
@@ -97,7 +98,8 @@ radeon_map_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++)
radeon_renderbuffer_map(ctx, fb->Attachment[i].Renderbuffer);
- radeon_check_front_buffer_rendering(ctx);
+ if (_mesa_is_front_buffer_drawing(fb))
+ RADEON_CONTEXT(ctx)->front_buffer_dirty = true;
}
static void
@@ -113,7 +115,8 @@ radeon_unmap_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++)
radeon_renderbuffer_unmap(ctx, fb->Attachment[i].Renderbuffer);
- radeon_check_front_buffer_rendering(ctx);
+ if (_mesa_is_front_buffer_drawing(fb))
+ RADEON_CONTEXT(ctx)->front_buffer_dirty = true;
}
static void radeonSpanRenderStart(struct gl_context * ctx)