OSDN Git Service

glsl: add subpass image type (v2)
authorDave Airlie <airlied@redhat.com>
Thu, 15 Sep 2016 01:08:12 +0000 (02:08 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 16 Sep 2016 05:16:31 +0000 (15:16 +1000)
commit7bf76563e25222fa285cf9a19207318759588aac
treef018a0e9cb267cc1bb954ad20b1f69f83a7b5f68
parent081f21f29bd6bee866ddb21d423ffa0506dd7bac
glsl: add subpass image type (v2)

SPIR-V/Vulkan have a special image type for input attachments
called the subpass type. It has different characteristics than
other images types.

The main one being it can only be an input image to fragment
shaders and loads from it are relative to the frag coord.

This adds support for it to the GLSL types. Unfortunately
we've run out of space in the sampler dim in types, so we
need to use another bit.

v2: Fixup subpass input name (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/builtin_type_macros.h
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h
src/compiler/nir/nir.h
src/mesa/program/prog_to_nir.c