diff options
author | Marek Olšák <maraeo@gmail.com> | 2012-08-09 10:34:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-08-13 10:50:56 -0400 |
commit | b51ad12a36234c1f6707c9c54a414cfca23f3cdb (patch) | |
tree | ab10fb4d373e31a260ffe83cef525bee2345b85c /drivers | |
parent | f00245f182fab57c5eed28a50764600b2bf1ccdb (diff) |
drm/radeon/kms: add MSAA texture support for r600-evergreen
Most of the checking seems to be in place already. As you can see,
log2(number of samples) resides in LAST_LEVEL.
This is required for MSAA support (namely for depth-stencil resolve and
blitting between MSAA resources).
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 |
3 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index f2e5c545c973..e44a62a07fe3 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -788,6 +788,13 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p, | |||
788 | case V_030000_SQ_TEX_DIM_1D_ARRAY: | 788 | case V_030000_SQ_TEX_DIM_1D_ARRAY: |
789 | case V_030000_SQ_TEX_DIM_2D_ARRAY: | 789 | case V_030000_SQ_TEX_DIM_2D_ARRAY: |
790 | depth = 1; | 790 | depth = 1; |
791 | break; | ||
792 | case V_030000_SQ_TEX_DIM_2D_MSAA: | ||
793 | case V_030000_SQ_TEX_DIM_2D_ARRAY_MSAA: | ||
794 | surf.nsamples = 1 << llevel; | ||
795 | llevel = 0; | ||
796 | depth = 1; | ||
797 | break; | ||
791 | case V_030000_SQ_TEX_DIM_3D: | 798 | case V_030000_SQ_TEX_DIM_3D: |
792 | break; | 799 | break; |
793 | default: | 800 | default: |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index ff61402ef795..3dab49cb1d4a 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -1620,8 +1620,13 @@ static int r600_check_texture_resource(struct radeon_cs_parser *p, u32 idx, | |||
1620 | case V_038000_SQ_TEX_DIM_2D_ARRAY: | 1620 | case V_038000_SQ_TEX_DIM_2D_ARRAY: |
1621 | is_array = true; | 1621 | is_array = true; |
1622 | break; | 1622 | break; |
1623 | case V_038000_SQ_TEX_DIM_2D_MSAA: | ||
1624 | case V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA: | 1623 | case V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA: |
1624 | is_array = true; | ||
1625 | /* fall through */ | ||
1626 | case V_038000_SQ_TEX_DIM_2D_MSAA: | ||
1627 | array_check.nsamples = 1 << llevel; | ||
1628 | llevel = 0; | ||
1629 | break; | ||
1625 | default: | 1630 | default: |
1626 | dev_warn(p->dev, "this kernel doesn't support %d texture dim\n", G_038000_DIM(word0)); | 1631 | dev_warn(p->dev, "this kernel doesn't support %d texture dim\n", G_038000_DIM(word0)); |
1627 | return -EINVAL; | 1632 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 4b736ecb0aa5..a7f8ac0d8f03 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -60,9 +60,10 @@ | |||
60 | * 2.16.0 - fix evergreen 2D tiled surface calculation | 60 | * 2.16.0 - fix evergreen 2D tiled surface calculation |
61 | * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx | 61 | * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx |
62 | * 2.18.0 - r600-eg: allow "invalid" DB formats | 62 | * 2.18.0 - r600-eg: allow "invalid" DB formats |
63 | * 2.19.0 - r600-eg: MSAA textures | ||
63 | */ | 64 | */ |
64 | #define KMS_DRIVER_MAJOR 2 | 65 | #define KMS_DRIVER_MAJOR 2 |
65 | #define KMS_DRIVER_MINOR 18 | 66 | #define KMS_DRIVER_MINOR 19 |
66 | #define KMS_DRIVER_PATCHLEVEL 0 | 67 | #define KMS_DRIVER_PATCHLEVEL 0 |
67 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 68 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
68 | int radeon_driver_unload_kms(struct drm_device *dev); | 69 | int radeon_driver_unload_kms(struct drm_device *dev); |