[Openchrome-users] Max Texture Size

Boris Dušek borisdusek
Sat May 13 02:58:16 PDT 2006


Hi Thomas,

On Thursday 11 May 2006 22:21, you wrote:

> Boris,
>
> Take a look at
> http://dri.freedesktop.org/wiki/ConfigurationForDevelopers
>
> and then at the top of via_screen.c in the unichrome 3D driver sources.
> A number of options is listed there with macros that are somewhat
> explained in the driconf wiki pages.
>
> Then install driconf and you will be able to tweak the options listed at
> the top of via_screen.c using driconf. (Quite neatly I must say), but
> hmm, wait. the options seem to never be queried by the driver.

I have recently studied xmlpool.h, xmlconfig.[hc] and options.h, so I think I 
am quite familiar with the drirc configuration. Thanks for the web resource, 
that was something I was unsuccessfully looking for at the beginning, but 
studying the sources has given me possibly more insight :) At least I now know 
how to add a Czech translation properly.
>
> So what it all boils down to is to add a boolean option to a suitable
> driconf section at the top of via_screen.c, which can then be queried using
>
> driQueryOptionb(&vmesa->optionCache, "max_texsize");
>
> And based on the return value decide to use the hack or not.

so this should not be called "allow_large_textures"? I am not sure, but it 
looks like that what t_options.h says about "allow_large_textures" is at 
least very similar:

DRI_CONF_OPT_BEGIN_V(allow_large_textures,enum,def,"0:2") \
    DRI_CONF_DESC_BEGIN(en,gettext("Support larger textures not guaranteed to 
fit into graphics memory")) \
        DRI_CONF_ENUM(0,gettext("No")) \
        DRI_CONF_ENUM(1,gettext("At least 1 texture must fit under worst-case 
assumptions")) \
        DRI_CONF_ENUM(2,gettext("Announce hardware limits")) \
    DRI_CONF_DESC_END \
DRI_CONF_OPT_END

I don't know any hardware-related things, just the xml-related (xmlconfig) :), 
so I can't tell if allow_large_textures is the right name/option - could you 
please shed more light into it?
>
> While you're at it, the unichrome dri driver have a number of options
>
> that are using environment variables:
>  > grep -i getenv *.c
>
> returns
>
> via_context.c:      if (getenv("ALTERNATE_SCREEN"))
> via_context.c:    if (getenv("VIA_DEBUG"))
> via_context.c:       VIA_DEBUG = driParseDebugString( getenv( "VIA_DEBUG"
> ), via_context.c:    if (getenv("VIA_NO_RAST"))
> via_context.c:    vmesa->vblank_flags = (getenv("VIA_VSYNC") ?
> via_context.c:    if (getenv("VIA_PAGEFLIP"))
> via_tex.c:   if (getenv("VIA_NO_SSE"))
>
> These should ideally also be moved to driconf option handling, which is
> only a matter of what others have started.

O.K., I will try to look at it too. It should be quite simple since I already 
know how to do that.

Btw. I am sending a preliminary version of my xmlconfig-enabled patch.
I would like you to review it, the only point I am not sure about is at 
via_tex.c:~514, do I have to check for the second condition (that's what I 
have added), or just leave only the first check (that's from the bugzilla 
patch)? Or would it be better to again query driQueryOption 
("allow_large_textures")?

What is good is that this patch works - with allow_large_textures=1 Xgl 
starts, without it not.

While I was at it, I also added calls to driDestroyOptionCache and 
driDestroyOptionInfo to places advised by xmlconfig.h - is it ok?

Cheers,
Boris
>
> /Thmas
>
> >_______________________________________________
> >openchrome-users mailing list
> >openchrome-users at openchrome.org
> >http://wiki.openchrome.org/mailman/listinfo/openchrome-users
> >Main page:
> >http://www.openchrome.org
> >Wiki:
> >http://wiki.openchrome.org
> >User Forum:
> >http://wiki.openchrome.org/tikiwiki/tiki-view_forum.php?forumId=1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: via-allow_large_textures-2006-05-09.patch
Type: text/x-diff
Size: 1583 bytes
Desc: not available
Url : http://wiki.openchrome.org/pipermail/openchrome-users/attachments/20060513/65e9b97e/via-allow_large_textures-2006-05-09.bin



More information about the Openchrome-users mailing list