• Jason Ekstrand's avatar
    compiler: Move double_inputs to gl_program::DualSlotInputs · 25efd787
    Jason Ekstrand authored
    Previously, we had two field in shader_info: double_inputs_read and
    double_inputs.  Presumably, the one was for all double inputs that are
    read and the other is all that exist.  However, because nir_gather_info
    regenerates these two values, there is a possibility, if a variable gets
    deleted, that the value of double_inputs could change over time.  This
    is a problem because double_inputs is used to remap the input locations
    to a two-slot-per-dvec3/4 scheme for i965.  If that mapping were to
    change between glsl_to_nir and back-end state setup, we would fall over
    when trying to map the NIR outputs back onto the GL location space.
    
    This commit changes the way slot re-mapping works.  Instead of the
    double_inputs field in shader_info, it adds a DualSlotInputs bitfield to
    gl_program.  By having it in gl_program, we more easily guarantee that
    NIR passes won't touch it after it's been set.  It also makes more sense
    to put it in a GL data structure since it's really a mapping from GL
    slots to back-end and/or NIR slots and not really a NIR shader thing.
    
    Tested-by: Alejandro Piñeiro <apinheiro@igalia.com> (ARB_gl_spirv tests)
    Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
    Reviewed-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
    25efd787
Name
Last commit
Last update
bin Loading commit data...
build-support Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...