[Mesa-dev] [PATCH 0/6] Remove NIR dependency on GLSL
Rob Clark
robdclark at gmail.com
Sat Oct 10 11:47:41 PDT 2015
From: Rob Clark <robclark at freedesktop.org>
This patchset removes the NIR dependency on GLSL (and includes resend
of shader_enums cleanups w/ addition of STATIC_ASSERT()'s)
Split up glsl_types so the builtin-types go w/ glsl_types but the parts
that add them to glsl_symbol_table stay with glsl. This way we can move
glsl_types into NIR without dragging along glsl_symbol_table and all of
it's dependencies.
Also move the half/float conversion into util so it can be used from NIR
without bringing an external dependency.
With this we can move glsl_types into NIR and drop the dependency on
GLSL, and mostly remove the libglsl_util hack. (The standalone glsl-
compiler util still needs libglsl_util, so we can't remove it completely
yet, but we can remove the dependency on libglsl_util from non-mesa
state trackers. And a hypothetical vulkan implementation using NIR
should also not need to suck in libglsl_util.)
Probably there is some room to rename things to complete the cleanup,
but I figured it was good to split things up into moving things first,
and do flag-day renames second (if desired).
Rob Clark (6):
glsl: couple shader_enums cleanups
glsl: move builtin types to glsl_types.cpp
glsl: move half<->float convertion to util
nir: use util/convert.h
nir: remove dependency on glsl
glsl: (mostly) remove libglsl_util
src/gallium/drivers/freedreno/Makefile.am | 3 +-
src/gallium/targets/d3dadapter9/Makefile.am | 1 -
src/gallium/targets/pipe-loader/Makefile.am | 1 -
src/gallium/targets/xa/Makefile.am | 1 -
src/glsl/Makefile.am | 10 +-
src/glsl/Makefile.sources | 4 +-
src/glsl/builtin_type_macros.h | 172 --
src/glsl/builtin_types.cpp | 4 +-
src/glsl/glsl_types.cpp | 1715 -------------------
src/glsl/glsl_types.h | 867 ----------
src/glsl/nir/builtin_type_macros.h | 172 ++
src/glsl/nir/glsl_types.cpp | 1729 ++++++++++++++++++++
src/glsl/nir/glsl_types.h | 867 ++++++++++
src/glsl/nir/nir_constant_expressions.py | 5 +-
src/glsl/nir/nir_types.h | 2 +-
src/glsl/nir/shader_enums.c | 8 +
src/glsl/nir/shader_enums.h | 7 +
.../drivers/dri/i965/brw_cubemap_normalize.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_fs.h | 2 +-
.../dri/i965/brw_fs_channel_expressions.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 +-
.../drivers/dri/i965/brw_fs_vector_splitting.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +-
.../dri/i965/brw_lower_unnormalized_offset.cpp | 2 +-
.../drivers/dri/i965/brw_schedule_instructions.cpp | 2 +-
src/mesa/main/ff_fragment_shader.cpp | 2 +-
src/mesa/main/imports.c | 148 --
src/mesa/main/imports.h | 38 +-
src/mesa/main/mtypes.h | 5 -
src/mesa/main/uniforms.h | 2 +-
src/mesa/program/ir_to_mesa.cpp | 2 +-
src/mesa/program/sampler.cpp | 2 +-
src/util/Makefile.sources | 2 +
src/util/convert.c | 179 ++
src/util/convert.h | 43 +
36 files changed, 3063 insertions(+), 2946 deletions(-)
delete mode 100644 src/glsl/builtin_type_macros.h
delete mode 100644 src/glsl/glsl_types.cpp
delete mode 100644 src/glsl/glsl_types.h
create mode 100644 src/glsl/nir/builtin_type_macros.h
create mode 100644 src/glsl/nir/glsl_types.cpp
create mode 100644 src/glsl/nir/glsl_types.h
create mode 100644 src/util/convert.c
create mode 100644 src/util/convert.h
--
2.4.3
More information about the mesa-dev
mailing list