summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2010-01-20 00:09:11 +0100
committerMaciej Cencora <m.cencora@gmail.com>2010-01-20 00:09:11 +0100
commit1f0709fd8f69bf8cc3e9502bad8d3e7296d935fb (patch)
tree1c6230a15e8ccafe689c412892af9d2e9d1a94ff /src/mesa/drivers
parent2706bc6a8898c7d7e155440cfa793035e56186b8 (diff)
r100/r200: align to pitch updates in blit interface
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index 2122584363..8b9bad1c78 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -146,7 +146,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
OUT_BATCH_REGVAL(R200_PP_TXFORMAT_X_0, 0);
OUT_BATCH_REGVAL(R200_PP_TXSIZE_0, ((width - 1) |
((height - 1) << RADEON_TEX_VSIZE_SHIFT)));
- OUT_BATCH_REGVAL(R200_PP_TXPITCH_0, pitch - 32);
+ OUT_BATCH_REGVAL(R200_PP_TXPITCH_0, pitch * _mesa_get_format_bytes(mesa_format) - 32);
OUT_BATCH_REGSEQ(R200_PP_TXOFFSET_0, 1);
OUT_BATCH_RELOC(0, bo, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
@@ -162,7 +162,7 @@ static inline void emit_cb_setup(struct r200_context *r200,
unsigned width,
unsigned height)
{
- uint32_t dst_pitch = pitch;
+ uint32_t dst_pitch = pitch * _mesa_get_format_bytes(mesa_format);
uint32_t dst_format = 0;
BATCH_LOCALS(&r200->radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index c1bb51a6ef..ff32b7d69e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -141,7 +141,7 @@ static void inline emit_tx_setup(struct r100_context *r100,
OUT_BATCH_REGVAL(RADEON_PP_TXFORMAT_0, txformat);
OUT_BATCH_REGVAL(RADEON_PP_TEX_SIZE_0, ((width - 1) |
((height - 1) << RADEON_TEX_VSIZE_SHIFT)));
- OUT_BATCH_REGVAL(RADEON_PP_TEX_PITCH_0, pitch - 32);
+ OUT_BATCH_REGVAL(RADEON_PP_TEX_PITCH_0, pitch * _mesa_get_format_bytes(mesa_format) - 32);
OUT_BATCH_REGSEQ(RADEON_PP_TXOFFSET_0, 1);
OUT_BATCH_RELOC(0, bo, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
@@ -157,7 +157,7 @@ static inline void emit_cb_setup(struct r100_context *r100,
unsigned width,
unsigned height)
{
- uint32_t dst_pitch = pitch;
+ uint32_t dst_pitch = pitch * _mesa_get_format_bytes(mesa_format);
uint32_t dst_format = 0;
BATCH_LOCALS(&r100->radeon);