Skip to content
  • Ian Romanick's avatar
    glsl/parser: Track built-in types using the glsl_type directly · 34f7e761
    Ian Romanick authored
    
    
    Without the lexer changes, tests/glslparsertest/glsl2/tex_rect-02.frag
    fails.  Before this change, the parser would determine that
    sampler2DRect is not a valid type because the call to
    state->symbols->get_type() in ast_type_specifier::glsl_type() would
    return NULL.  Since ast_type_specifier::glsl_type() is now going to
    return the glsl_type pointer that it received from the lexer, it doesn't
    have an opportunity to generate an error.
    
       text	   data	    bss	    dec	    hex	filename
    8255243	 268856	 294072	8818171	 868dfb	32-bit i965_dri.so before
    8255291	 268856	 294072	8818219	 868e2b	32-bit i965_dri.so after
    7815195	 345592	 420592	8581379	 82f103	64-bit i965_dri.so before
    7815339	 345592	 420592	8581523	 82f193	64-bit i965_dri.so after
    
    Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
    Reviewed-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
    34f7e761