summaryrefslogtreecommitdiffstats
path: root/src/compiler/builtin_type_macros.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-09-15 02:08:12 +0100
committerDave Airlie <airlied@redhat.com>2016-09-16 15:16:31 +1000
commit7bf76563e25222fa285cf9a19207318759588aac (patch)
treef018a0e9cb267cc1bb954ad20b1f69f83a7b5f68 /src/compiler/builtin_type_macros.h
parent081f21f29bd6bee866ddb21d423ffa0506dd7bac (diff)
downloadexternal_mesa3d-7bf76563e25222fa285cf9a19207318759588aac.zip
external_mesa3d-7bf76563e25222fa285cf9a19207318759588aac.tar.gz
external_mesa3d-7bf76563e25222fa285cf9a19207318759588aac.tar.bz2
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>
Diffstat (limited to 'src/compiler/builtin_type_macros.h')
-rw-r--r--src/compiler/builtin_type_macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/builtin_type_macros.h b/src/compiler/builtin_type_macros.h
index da3f19e..3db3b76 100644
--- a/src/compiler/builtin_type_macros.h
+++ b/src/compiler/builtin_type_macros.h
@@ -159,6 +159,8 @@ DECL_TYPE(uimageCubeArray, GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY, GLSL_TYPE
DECL_TYPE(uimage2DMS, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_MS, 0, 0, GLSL_TYPE_UINT)
DECL_TYPE(uimage2DMSArray, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_MS, 0, 1, GLSL_TYPE_UINT)
+DECL_TYPE(subpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS,0, 0, GLSL_TYPE_FLOAT)
+
DECL_TYPE(atomic_uint, GL_UNSIGNED_INT_ATOMIC_COUNTER, GLSL_TYPE_ATOMIC_UINT, 1, 1)
STRUCT_TYPE(gl_DepthRangeParameters)