if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLOROFFSET, 0));
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_RELOC(rrb->draw_offset, rrb->bo, rrb->draw_offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLORPITCH, 0));
OUT_BATCH_RELOC(cbpitch, rrb->bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
static GLubyte *r200_depth_2byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
GLint offset;
if (rrb->has_surface) {
offset = x * rrb->cpp + y * rrb->pitch;
static GLubyte *r200_depth_4byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
GLint offset;
if (rrb->has_surface) {
offset = x * rrb->cpp + y * rrb->pitch;
static GLubyte *radeon_ptr_4byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
uint32_t mask = RADEON_BO_FLAGS_MACRO_TILE | RADEON_BO_FLAGS_MICRO_TILE;
GLint offset;
static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
uint32_t mask = RADEON_BO_FLAGS_MACRO_TILE | RADEON_BO_FLAGS_MICRO_TILE;
GLint offset;
if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLOROFFSET, 0));
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_RELOC(rrb->draw_offset, rrb->bo, rrb->draw_offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLORPITCH, 0));
OUT_BATCH_RELOC(cbpitch, rrb->bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);