Commit Graph

13 Commits

Author SHA1 Message Date
Timothy Arceri cd52b4fb16 nir: add more helpers to nir_types.cpp
These new helpers will be used in nir_gather_info.c in a following patch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-11-11 09:17:07 +11:00
Kenneth Graunke f7659e02c3 nir: Delete open coded type printing.
glsl_print_type() prints arrays of arrays incorrectly.  For example,
a type with name float[3][7] would be printed as float[7][3].  (This
is an array of length 3 containing arrays of 7 floats.)  cdecl says
that the type name is correct.

glsl_print_type() doesn't really do anything above and beyond printing
type->name, and glsl_print_struct() wasn't used at all.  So, drop them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-06 02:13:36 -07:00
Timothy Arceri 7a9d6abcae nir: add glsl_dvec_type() helper
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-06 23:20:23 -07:00
Timothy Arceri 20e935e6f6 nir: add glsl_double_type() helper
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Kenneth Graunke 1896682d27 compiler: Add a C wrapper for glsl_type::without_array().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
2016-05-07 15:44:41 -07:00
Matt Turner 9bac27dbf9 glsl: Rename "vertex_input_slots" -> "is_vertex_input"
vertex_input_slots would be an appropriate name for an integer, but not
a bool.

Also remove a cond ? true : false from a count_attribute_slots() call
site, noticed during the rename.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-04-13 11:00:21 -07:00
Jason Ekstrand 05db680248 nir/types: Add a wrapper for count_attribute_slots
Reviewed-by: Rob Clark <robdclark@gmail.com>
2016-04-07 09:44:11 +02:00
Jason Ekstrand 7410c60988 nir/types: Add more type constructor functions
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-02-13 17:22:36 -08:00
Jason Ekstrand f05f576803 nir/types: Add a few more glsl_type_is_ functions
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-02-13 17:22:36 -08:00
Jason Ekstrand 914829f766 nir/types: Add helpers for working with sampler and image types
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-02-13 17:22:36 -08:00
Jason Ekstrand d140b13fd5 nir/types: Add helpers for function types
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-02-13 17:22:36 -08:00
Emil Velikov eb63640c1d glsl: move to compiler/
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-26 16:08:33 +00:00
Emil Velikov f694da80c7 compiler: move the glsl_types C wrapper alongside their C++ brethren
At a later stage we might want to split out the NIR specific [XXX:
which one was it], as to make things move obvious and rename the files
appropriately. This patch aims to split it out of nir.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-26 16:08:27 +00:00
Renamed from src/glsl/nir/nir_types.cpp (Browse further)