[Mesa-dev] Status of the GLSL->TGSI translator

Kenneth Graunke kenneth at whitecape.org
Wed Jun 15 14:59:02 PDT 2011


Bryan,

Thanks for your work on this!  I'm glad to see GLSL IR->TGSI happening.

A few quick comments on "mesa,st/mesa: add native support for integers 
in shaders"...

glsl_type::get_vec4_type(base) is equivalent to 
glsl_type::get_instance(base, 4, 1) except that it returns error_type 
instead of NULL.  You might want to use get_instance directly or 
implement get_vec4_type on top of it.

For the ir_unop_u2f, ir_unop_bit_not, ir_binop_lshift, ir_binop_rshift, 
ir_binop_bit_and, ir_binop_bit_xor, and ir_binop_bit_or cases...you 
don't need the glsl_version >= 130 check.  These were first introduced 
in GLSL 1.30 and should never occur in prior versions.  (If anything, 
I'd assert instead of emitting nothing.)

--Kenneth


More information about the mesa-dev mailing list