On 03/25/2013 03:38 PM, Ondrej Holecek 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.

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;


We should init the whole object to zeros to be safe. I'll post a patch for that.

-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to