From b52d1be4302e452a45a03595f8c70411a061f920 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 17 Aug 2026 01:41:16 -0700 Subject: move the texture binding to a push descriptor with a descriptor update template, even yay this also moves us to a minimum Vulkan version of 1.4, which we understand to be widely deployed. in theory, push descriptors and update templates were available via extensions in earlier versions, but it doesn't seem worth doing the work to switch out whether we use the extensions based on the version, so we don't. Force-Push: yes Change-Id: I26db8771abf5626d9614630c66e019ea99babcac --- shaders/shader.frag | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'shaders/shader.frag') diff --git a/shaders/shader.frag b/shaders/shader.frag index a2561d1..90d6ab0 100644 --- a/shaders/shader.frag +++ b/shaders/shader.frag @@ -1,7 +1,10 @@ #version 460 -layout(binding = 1) uniform sampler textureSampler; -layout(binding = 2) uniform texture2D textureImage; +// Set 0 is the default, so we could omit it, but we prefer to be explicit. +// It specifies which the descriptor set layout the binding index pertains to; +// see init_pipeline() in render.rs. +layout(set = 0, binding = 1) uniform sampler textureSampler; +layout(set = 1, binding = 0) uniform texture2D textureImage; layout(location = 0) in vec3 fragmentColor; layout(location = 1) in vec2 fragmentTextureCoordinate; -- cgit 1.4.1