Re: 3D texture size limitations in mesa/r200?

"R. Aditya Kadambi" <[email protected]> Fri, 4 Jan 2008 11:20:46 -0700
Newsgroups gmane.comp.video.dri.user
Message-ID <[email protected]>
On Jan 4, 2008 11:05 AM, Alex Deucher <[email protected]> wrote:

> On Jan 4, 2008 1:00 PM, R. Aditya Kadambi <[email protected]> wrote:
> >
> >
> > On Jan 4, 2008 6:48 AM, R. Aditya Kadambi <[email protected]> wrote:
> > >
> > >
> > >
> > >
> > > On Jan 4, 2008 2:16 AM, Alexander Toresson <
> [email protected]>
> > wrote:
> > >
> > > >
> > > > On Jan 4, 2008 1:55 AM, R. Aditya Kadambi <[email protected]>
> wrote:
> > > > > Hi;
> > > > >
> > > > > I am trying do hardware accelerated volume rendering with 3D
> textures
> > using
> > > > > a scenegraph called OpenRM(www.openrm.org). The program is called
> > vrend
> > > > > which uses 3D textures
> > > > >  to HW render 3D raw data.
> > > > >
> > > > > I am using ATI X9250 (R200) card. I am trying to render two sets
> of
> > raw
> > > > > data. The smaller one which is 64x64x64 is successfully rendered
> with
> > 3D
> > > > > textures with r200 driver. The bigger volume which is 256x64x256
> only
> > > > > appears to be rendered in "half" along the z axis. The other half
> > appears as
> > > > > garbage.
> > > > >
> > > > > I put in a call for 3D texture size and it comes as 256 (which
> > probably
> > > > > means I can render a 256x256x256 cube??).
> > > > >
> > > > > I was able to successfully Software render it on Mesa. It renders
> > fine.
> > > > > Furthermore, it is rendered fine with the ATI proprietary driver
> (V
> > 8.28.8)
> > > > > (surprise! surprise!).
> > > > >
> > > > > This makes me suspect the r200 driver. Is there an inherent
> limitation
> > or a
> > > > > bug or a missing feature in the driver (r200/mesa) which might
> cause
> > this.
> > > > > Is there any way for me to compile mesa with debug flags to test
> this?
> > Or is
> > > > > there a bug in the lower level ati driver?
> > > > >
> > > >
> > > > The r200 has a hardware-limitation of 2048x2048 for 2d textures. I'm
> > > > not sure, but this problem might be related to that.
> > >
> > >
> > > Is this limit imposed by the driver for some reason? because, the card
> > does render bigger volumes through proprietary driver. Furthermore, it
> says
> > the
> > > 3D texture size is 256x256x256, which is higher then the volume  I am
> > trying to render.
> >
> > More info:
> >
> > On the system with DRI/Mesa, the value of GL_MAX_3D_TEXTURE_SIZE = 256
> while
> > GL_MAX_TEXTURE_SIZE = 2048
> > on the system with ATI fglrx the value of GL_MAX_3D_TEXTURE_SIZE = 512
> while
> > GL_MAX_TEXTURE_SIZE = 2048
>
> IIRC, 3D texture sizes were limited due to memory constraints, but the
> hw supports larger ones.  you could probably hack around it in the
> driver pretty easily.
>
> Alex

I suppose its in r200_context.c

driCalculateMaxTextureLevels( rmesa->texture_heaps,
				 rmesa->nr_heaps,
				 & ctx->Const,
				 4,
				 11, /* max 2D texture size is 2048x2048 */
#if ENABLE_HW_3D_TEXTURE
				 8,  /* max 3D texture size is 256^3 */
#else
				 0,  /* 3D textures unsupported */
#endif
				 11, /* max cube texture size is 2048x2048 */
				 11, /* max texture rectangle size is 2048x2048 */
				 12,
				 GL_FALSE );


Do I change the part to just make it to 512? But even if it is 256,
shouldn't it render a cube of 256^3? (Thats the volume I am trying) or does
it need to be set to 512 (which could explain why fglrx renders it fine)

Thanks for the help

-Aditya

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

--
_______________________________________________
Dri-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-users