[Mesa-dev] [PATCH 0/5] Head-up display for Gallium DRI2 drivers

Marek Olšák maraeo at gmail.com
Mon Mar 25 15:00:25 PDT 2013

On Mon, Mar 25, 2013 at 10:38 PM, Ondrej Holecek <aaannz at gmail.com> wrote:
> On Saturday 23 of March 2013 00:50:59 Marek Olšák wrote:
>> Hi everyone, one image is better than a thousand words:
>> ...
> Hi,
> I tried your patches and hit a few problems. As first, they do not apply
> cleanly on master as they are expecting another your patch "cso: add constant
> buffer save/restore feature for postprocessing" to be present. But I guess you
> are aware of that.

Yes, I sent the patch to mesa-dev earlier.

> Second problem is that when I build mesa with HUD on my 32bit virtual machine,
> HUD works (with 32bit app of course). When I build it on 64bit (both are same
> uptodate OS openSUSE 12.3), HUD is not working (with 64bit app). I managed to
> track it down to failed IMM instruction parsing during HUD_create function. It
> appears that translate_ctx structure in tgsi_text_translate (file
> src/gallium/auxiliary/tgsi/tgsi_text.c) is not initialized to zeros under my
> 64bit system, instead ctx.num_immediates is equal to 1 and hence trigger
> "Immediates must be sorted" error.
> Following fixes HUD for me (note that I really don't know if I am not broking
> something here in regards to mesa):
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c
> b/src/gallium/auxiliary/tgsi/tgsi_text.c
> index 6b97bee..247ec75 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_text.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
> @@ -1577,6 +1577,7 @@ tgsi_text_translate(
>     ctx.tokens = tokens;
>     ctx.tokens_cur = tokens;
>     ctx.tokens_end = tokens + num_tokens;
> +   ctx.num_immediates = 0;
>     if (!translate( &ctx ))
>        return FALSE;

I've sent a fix for this a couple of days ago:


> The third issue is that on both 32bit and 64bit build fonts are not displayed
> in HUD. I see graphs and transparent background rectangles for text but no
> text is visible. This one I did not yet solve.

Your driver must support the I8_UNORM texture format.

> One last thought, is it intentional when wrong query is entered that hud graph
> is displayed but empty? Maybe some text like wrong query XXX would be a good
> hint. I know it is printed on stdout but looking for warnings in chatty apps
> like openarena is little tricky.

Yes, it's intentional. I guess I can at least make it not draw an empty pane.


More information about the mesa-dev mailing list