[Mesa-dev] [PATCH 0/5] Head-up display for Gallium DRI2 drivers
Ondrej Holecek
aaannz at gmail.com
Mon Mar 25 14:38:35 PDT 2013
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.
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;
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.
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.
Thanks for your work,
OH
More information about the mesa-dev
mailing list