[PATCH] radeon: Allow N x 1 x 1 surfaces for evergreen+
I think it would be cleaner to add a new SURF_TYPE for buffers and only allow large npix_x for that (and adding all the necessary sanity checks to disallow invalid values). Also, if you want to use it in Mesa, you or somebody else should: 1) make a libdrm release 2) bump libdrm_radeon version requirement in Mesa's configure.ac Marek On Fri, Sep 21, 2012 at 10:23 PM, Tom Stellard wrote: > From: Tom Stellard > > This makes it possible to create a surface for a buffer. > --- > radeon/radeon_surface.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c > index 80b1505..235f4ae 100644 > --- a/radeon/radeon_surface.c > +++ b/radeon/radeon_surface.c > @@ -686,7 +686,8 @@ static int eg_surface_sanity(struct > radeon_surface_manager *surf_man, > unsigned tileb; > > /* check surface dimension */ > -if (surf->npix_x > 16384 || surf->npix_y > 16384 || surf->npix_z > > 16384) { > +if ((surf->npix_x > 16384 && (surf->npix_y != 1 || surf->npix_z != 1)) > || > +surf->npix_y > 16384 || surf->npix_z > 16384) { > return -EINVAL; > } > > -- > 1.7.11.4 > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] radeon: Allow N x 1 x 1 surfaces for evergreen+
From: Tom StellardThis makes it possible to create a surface for a buffer. --- radeon/radeon_surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 80b1505..235f4ae 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -686,7 +686,8 @@ static int eg_surface_sanity(struct radeon_surface_manager *surf_man, unsigned tileb; /* check surface dimension */ -if (surf->npix_x > 16384 || surf->npix_y > 16384 || surf->npix_z > 16384) { +if ((surf->npix_x > 16384 && (surf->npix_y != 1 || surf->npix_z != 1)) || +surf->npix_y > 16384 || surf->npix_z > 16384) { return -EINVAL; } -- 1.7.11.4
[PATCH] radeon: Allow N x 1 x 1 surfaces for evergreen+
From: Tom Stellard thomas.stell...@amd.com This makes it possible to create a surface for a buffer. --- radeon/radeon_surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 80b1505..235f4ae 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -686,7 +686,8 @@ static int eg_surface_sanity(struct radeon_surface_manager *surf_man, unsigned tileb; /* check surface dimension */ -if (surf-npix_x 16384 || surf-npix_y 16384 || surf-npix_z 16384) { +if ((surf-npix_x 16384 (surf-npix_y != 1 || surf-npix_z != 1)) || +surf-npix_y 16384 || surf-npix_z 16384) { return -EINVAL; } -- 1.7.11.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] radeon: Allow N x 1 x 1 surfaces for evergreen+
I think it would be cleaner to add a new SURF_TYPE for buffers and only allow large npix_x for that (and adding all the necessary sanity checks to disallow invalid values). Also, if you want to use it in Mesa, you or somebody else should: 1) make a libdrm release 2) bump libdrm_radeon version requirement in Mesa's configure.ac Marek On Fri, Sep 21, 2012 at 10:23 PM, Tom Stellard t...@stellard.net wrote: From: Tom Stellard thomas.stell...@amd.com This makes it possible to create a surface for a buffer. --- radeon/radeon_surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 80b1505..235f4ae 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -686,7 +686,8 @@ static int eg_surface_sanity(struct radeon_surface_manager *surf_man, unsigned tileb; /* check surface dimension */ -if (surf-npix_x 16384 || surf-npix_y 16384 || surf-npix_z 16384) { +if ((surf-npix_x 16384 (surf-npix_y != 1 || surf-npix_z != 1)) || +surf-npix_y 16384 || surf-npix_z 16384) { return -EINVAL; } -- 1.7.11.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel