On Thu, Aug 9, 2012 at 10:34 AM, Marek Olšák <maraeo@xxxxxxxxx> wrote: > Most of the checking seems to be in place already. As you can see, > log2(number of samples) resides in LAST_LEVEL. Yeah i tried to make it easy but i might have get few thing wrong, i do hope not. > This is required for MSAA support (namely for depth-stencil resolve and > blitting between MSAA resources). > > Signed-off-by: Marek Olšák <maraeo@xxxxxxxxx> Reviewed-by: Jerome Glisse <jglisse@xxxxxxxxxx> > --- > drivers/gpu/drm/radeon/evergreen_cs.c | 7 +++++++ > drivers/gpu/drm/radeon/r600_cs.c | 7 ++++++- > 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 f2e5c54..e44a62a 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, > case V_030000_SQ_TEX_DIM_1D_ARRAY: > case V_030000_SQ_TEX_DIM_2D_ARRAY: > depth = 1; > + break; > + case V_030000_SQ_TEX_DIM_2D_MSAA: > + case V_030000_SQ_TEX_DIM_2D_ARRAY_MSAA: > + surf.nsamples = 1 << llevel; > + llevel = 0; > + depth = 1; > + break; > case V_030000_SQ_TEX_DIM_3D: > break; > default: > diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c > index ff61402..3dab49c 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, > case V_038000_SQ_TEX_DIM_2D_ARRAY: > is_array = true; > break; > - case V_038000_SQ_TEX_DIM_2D_MSAA: > case V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA: > + is_array = true; > + /* fall through */ > + case V_038000_SQ_TEX_DIM_2D_MSAA: > + array_check.nsamples = 1 << llevel; > + llevel = 0; > + break; > default: > dev_warn(p->dev, "this kernel doesn't support %d texture dim\n", G_038000_DIM(word0)); > return -EINVAL; > diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c > index 4b736ec..a7f8ac0 100644 > --- a/drivers/gpu/drm/radeon/radeon_drv.c > +++ b/drivers/gpu/drm/radeon/radeon_drv.c > @@ -60,9 +60,10 @@ > * 2.16.0 - fix evergreen 2D tiled surface calculation > * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx > * 2.18.0 - r600-eg: allow "invalid" DB formats > + * 2.19.0 - r600-eg: MSAA textures > */ > #define KMS_DRIVER_MAJOR 2 > -#define KMS_DRIVER_MINOR 18 > +#define KMS_DRIVER_MINOR 19 > #define KMS_DRIVER_PATCHLEVEL 0 > int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); > int radeon_driver_unload_kms(struct drm_device *dev); > -- > 1.7.9.5 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel