diff options
author | Dave Airlie <[email protected]> | 2011-11-11 16:13:06 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-12-05 14:36:19 +0000 |
commit | b2596c36c8f73e8bb7a0b1679b491662aeb2f9d9 (patch) | |
tree | 0eff8746b4334dbc6e780e7426031a910335a781 /src/mesa/drivers/dri/r200 | |
parent | fd7fcfcc2dffb73ac3159a04ccd164b527c11a8f (diff) |
radeon: texture/renderbuffer overhaul.
This could have been split up better, but the driver is just broken now,
so bisecting the brokenness is going to be painful no matter what.
This adds renderbuffer mapping/unmapping along with texture image allocation.
It drops all the old texture upload paths, some of which could possible be
reimplemented with the blitter later.
It also redoes the span code paths to use its own set of image mapping handlers,
along with removing the tiling decode paths for the color buffers, since
we now hope to use the blitter for this.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_blit.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_blit.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c index 487bb5b78e1..04ab6d07def 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.c +++ b/src/mesa/drivers/dri/r200/r200_blit.c @@ -38,7 +38,7 @@ static inline uint32_t cmdpacket0(struct radeon_screen *rscrn, } /* common formats supported as both textures and render targets */ -unsigned r200_check_blit(gl_format mesa_format) +unsigned r200_check_blit(gl_format mesa_format, uint32_t dst_pitch) { /* XXX others? BE/LE? */ switch (mesa_format) { @@ -58,6 +58,12 @@ unsigned r200_check_blit(gl_format mesa_format) return 0; } + /* Rendering to small buffer doesn't work. + * Looks like a hw limitation. + */ + if (dst_pitch < 32) + return 0; + /* ??? */ if (_mesa_get_format_bits(mesa_format, GL_DEPTH_BITS) > 0) return 0; @@ -467,19 +473,13 @@ unsigned r200_blit(struct gl_context *ctx, { struct r200_context *r200 = R200_CONTEXT(ctx); - if (!r200_check_blit(dst_mesaformat)) + if (!r200_check_blit(dst_mesaformat, dst_pitch)) return GL_FALSE; /* Make sure that colorbuffer has even width - hw limitation */ if (dst_pitch % 2 > 0) ++dst_pitch; - /* Rendering to small buffer doesn't work. - * Looks like a hw limitation. - */ - if (dst_pitch < 32) - return GL_FALSE; - /* Need to clamp the region size to make sure * we don't read outside of the source buffer * or write outside of the destination buffer. diff --git a/src/mesa/drivers/dri/r200/r200_blit.h b/src/mesa/drivers/dri/r200/r200_blit.h index 56018b9c0ea..fb5dacbe870 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.h +++ b/src/mesa/drivers/dri/r200/r200_blit.h @@ -30,7 +30,7 @@ void r200_blit_init(struct r200_context *r200); -unsigned r200_check_blit(gl_format mesa_format); +unsigned r200_check_blit(gl_format mesa_format, uint32_t dst_pitch); unsigned r200_blit(struct gl_context *ctx, struct radeon_bo *src_bo, |