OSDN Git Service

glsl: Add GLSL_TYPE_INTERFACE
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Dec 2012 20:11:16 +0000 (12:11 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:33 +0000 (09:07 -0500)
commit491364e1f34ddb2c8ea439e871dd42aaa5cc9b28
tree339b24932702a6421845c15c08fcba2bcc4104f8
parent7f96a8471e8ddf2b49a644780f35ee493157782a
glsl: Add GLSL_TYPE_INTERFACE

Interfaces are structurally identical to structures from the compiler's
point of view.  They have some additional restrictions, and generally
GPUs use different instructions to access them.  Using a different base
type should make this a bit easier.

This commit also adds the glsl_type::interface_packing fields.  For
GLSL_TYPE_INTERFACE types, this will track the specified packing mode.
It is analogous to gl_uniform_buffer::_Packing.

v2: Add serveral missing GLSL_TYPE_INTERFACE cases in switch-statements.

v3: Add information about glsl_type::interface_packing.  Move row_major
checking in glsl_type::record_key_compare from this patch to the
previous patch.  Both suggested by Paul Berry.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/ir_clone.cpp
src/glsl/link_uniform_initializers.cpp
src/glsl/tests/uniform_initializer_utils.cpp
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/program/ir_to_mesa.cpp