From: Kristian Høgsberg Kristensen Date: Mon, 11 Jan 2016 20:29:42 +0000 (-0800) Subject: vk: Support SpvBuiltInViewportIndex X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7df20f0c1456738aa598ba8d4ce88679765ca13e;p=mesa.git vk: Support SpvBuiltInViewportIndex --- diff --git a/src/glsl/nir/spirv/spirv_to_nir.c b/src/glsl/nir/spirv/spirv_to_nir.c index 71e589d88b7..d5b9afefa7c 100644 --- a/src/glsl/nir/spirv/spirv_to_nir.c +++ b/src/glsl/nir/spirv/spirv_to_nir.c @@ -924,6 +924,15 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = VARYING_SLOT_LAYER; *mode = nir_var_shader_out; break; + case SpvBuiltInViewportIndex: + *location = VARYING_SLOT_VIEWPORT; + if (b->shader->stage == MESA_SHADER_GEOMETRY) + *mode = nir_var_shader_out; + else if (b->shader->stage == MESA_SHADER_FRAGMENT) + *mode = nir_var_shader_in; + else + unreachable("invalid stage for SpvBuiltInViewportIndex"); + break; case SpvBuiltInTessLevelOuter: case SpvBuiltInTessLevelInner: case SpvBuiltInTessCoord: