diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2006-04-11 04:20:25 +0000 |
---|---|---|
committer | Aapo Tahkola <aet@rasterburn.org> | 2006-04-11 04:20:25 +0000 |
commit | 3ed16bd9cce8809bde1a1afdaecb0e78825182a5 (patch) | |
tree | ad015154b074e31c92c41566346e09d85dd2f86d /src | |
parent | 6c419be40201323c83e5428f6de148be1eded28e (diff) |
rectangular fp16 fixes (Ewald Snel)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texmem.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c index a9f64b47c4..c1d01020cd 100644 --- a/src/mesa/drivers/dri/r300/r300_texmem.c +++ b/src/mesa/drivers/dri/r300/r300_texmem.c @@ -130,6 +130,12 @@ static void r300UploadGARTClientSubImage(r300ContextPtr rmesa, srcPitch = t->image[0][0].width * texFormat->TexelBytes; dstPitch = t->image[0][0].width * texFormat->TexelBytes; break; + case 8: + case 16: + blit_format = R200_CP_COLOR_FORMAT_CI8; + srcPitch = t->image[0][0].width * texFormat->TexelBytes; + dstPitch = t->image[0][0].width * texFormat->TexelBytes; + break; default: return; } @@ -144,6 +150,10 @@ static void r300UploadGARTClientSubImage(r300ContextPtr rmesa, width = texImage->Width; height = texImage->Height; + if (texFormat->TexelBytes > 4) { + width *= texFormat->TexelBytes; + } + r300EmitWait(rmesa, R300_WAIT_3D); r300EmitBlit(rmesa, blit_format, @@ -177,6 +187,10 @@ static void r300UploadRectSubImage(r300ContextPtr rmesa, case 4: blit_format = R200_CP_COLOR_FORMAT_ARGB8888; break; + case 8: + case 16: + blit_format = R200_CP_COLOR_FORMAT_CI8; + break; default: return; } @@ -189,6 +203,10 @@ static void r300UploadRectSubImage(r300ContextPtr rmesa, height = texImage->Height; dstPitch = t->pitch; + if (texFormat->TexelBytes > 4) { + width *= texFormat->TexelBytes; + } + if (rmesa->prefer_gart_client_texturing && texImage->IsClientData) { /* In this case, could also use GART texturing. This is * currently disabled, but has been tested & works. |