In case no one noticed, since this patch
(22370990f28987b361c6adf8e81c5a18184e88ea)
invalid tokens are generated for some shaders, probably everything
that involes indirect register access.

I can't think of any official test program right now, and I don't
particularly like to dig into that part of the tgsi code at the
moment, but I'll try if no one else quickly comes up with a fix.

For example:

Error  : CONST: Undeclared source register
Warning: Indirect register neither ADDR[0] nor LOOP[0]
Error  : CONST: Undeclared source register
Warning: Indirect register neither ADDR[0] nor LOOP[0]
2 errors, 2 warnings
tgsi_ureg.c, sanity check failed on generated tokens:
VERT
DCL IN[0]
DCL OUT[0], POSITION
DCL OUT[1], COLOR
DCL OUT[2], BCOLOR
DCL CONST[0..69]
DCL TEMP[0..1]
DCL ADDR[0]
  0: MUL TEMP[0], CONST[66], IN[0].yyyy
  1: MAD TEMP[1], CONST[65], IN[0].xxxx, TEMP[0]
  2: MAD TEMP[0], CONST[67], IN[0].zzzz, TEMP[1]
  3: MAD OUT[0], CONST[68], IN[0].wwww, TEMP[0]
  4: ADD TEMP[0].x, CONST[64].xxxx, CONST[69].xxxx
  5: ARL ADDR[0].x, TEMP[0].xxxx
  6: MOV OUT[1], CONST[ADDR[0].x]
  7: SUB TEMP[0].y, CONST[64].xxxx, CONST[69].xxxx
  8: ARL ADDR[0].x, TEMP[0].yyyy
  9: MOV OUT[2], CONST[ADDR[0].x]
 10: END
tgsi_ureg.c:1128:ureg_finalize: Assertion `0' failed.
debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE

  static const char *vprog = "#version 120\n"
    "uniform vec4 color_array[64];\n"
    "uniform int i;\n"

    "void main() {\n"
    "  gl_Position = ftransform();\n"
    "  gl_FrontColor = color_array[i + 1];\n"
    "  gl_BackColor = color_array[i - 1];\n"
    "}\n";

  static const char *fprog = "#version 120\n"
    "void main() {\n"
    "  gl_FragColor = gl_Color;\n"
    "}\n";

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to