diff options
author | Dave Airlie <airlied@redhat.com> | 2009-12-06 22:16:06 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-16 01:10:45 -0500 |
commit | d785d78bbdb53580b12c40e820af5a3281ce2fc8 (patch) | |
tree | 080fad9ee53f058ee044e9bce4d151f860916be0 /drivers/gpu/drm/radeon/r300.c | |
parent | 6e7267721fd67d626433ea10c59fc232c6928259 (diff) |
drm/radeon/kms: fix r100->r500 CS checker for compressed textures. (v2)
This adds support for compressed textures to the r100->r500 CS
checker, it lets me run openarena and the demos in mesa fine.
Thanks to Maciej Cencora for initial comments.
Changes since v1:
fix calculations with Maciej formulas
Reviewed-by: Maciej Cencora <m.cencora@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index dbb149060b1d..83490c2b5061 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -860,7 +860,6 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
860 | case R300_TX_FORMAT_Z6Y5X5: | 860 | case R300_TX_FORMAT_Z6Y5X5: |
861 | case R300_TX_FORMAT_W4Z4Y4X4: | 861 | case R300_TX_FORMAT_W4Z4Y4X4: |
862 | case R300_TX_FORMAT_W1Z5Y5X5: | 862 | case R300_TX_FORMAT_W1Z5Y5X5: |
863 | case R300_TX_FORMAT_DXT1: | ||
864 | case R300_TX_FORMAT_D3DMFT_CxV8U8: | 863 | case R300_TX_FORMAT_D3DMFT_CxV8U8: |
865 | case R300_TX_FORMAT_B8G8_B8G8: | 864 | case R300_TX_FORMAT_B8G8_B8G8: |
866 | case R300_TX_FORMAT_G8R8_G8B8: | 865 | case R300_TX_FORMAT_G8R8_G8B8: |
@@ -874,8 +873,6 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
874 | case 0x17: | 873 | case 0x17: |
875 | case R300_TX_FORMAT_FL_I32: | 874 | case R300_TX_FORMAT_FL_I32: |
876 | case 0x1e: | 875 | case 0x1e: |
877 | case R300_TX_FORMAT_DXT3: | ||
878 | case R300_TX_FORMAT_DXT5: | ||
879 | track->textures[i].cpp = 4; | 876 | track->textures[i].cpp = 4; |
880 | break; | 877 | break; |
881 | case R300_TX_FORMAT_W16Z16Y16X16: | 878 | case R300_TX_FORMAT_W16Z16Y16X16: |
@@ -886,6 +883,15 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
886 | case R300_TX_FORMAT_FL_R32G32B32A32: | 883 | case R300_TX_FORMAT_FL_R32G32B32A32: |
887 | track->textures[i].cpp = 16; | 884 | track->textures[i].cpp = 16; |
888 | break; | 885 | break; |
886 | case R300_TX_FORMAT_DXT1: | ||
887 | track->textures[i].cpp = 1; | ||
888 | track->textures[i].compress_format = R100_TRACK_COMP_DXT1; | ||
889 | break; | ||
890 | case R300_TX_FORMAT_DXT3: | ||
891 | case R300_TX_FORMAT_DXT5: | ||
892 | track->textures[i].cpp = 1; | ||
893 | track->textures[i].compress_format = R100_TRACK_COMP_DXT35; | ||
894 | break; | ||
889 | default: | 895 | default: |
890 | DRM_ERROR("Invalid texture format %u\n", | 896 | DRM_ERROR("Invalid texture format %u\n", |
891 | (idx_value & 0x1F)); | 897 | (idx_value & 0x1F)); |