There is MAX_TEXTURES in native code in vk_const.h read from vk_textures.{c,h}.
And there is a specialization constant in shaders/ray_interop.h.
There's no direct tie between those. They are "accidentally" the same. For binding on meatpipe side the default spec const value is used. However, later in vulkan code it will feed it with a pointer to an array in vk_textures with the size from vk_const.h.
There is
MAX_TEXTURES
in native code invk_const.h
read fromvk_textures.{c,h}
. And there is a specialization constant inshaders/ray_interop.h
.There's no direct tie between those. They are "accidentally" the same. For binding on meatpipe side the default spec const value is used. However, later in vulkan code it will feed it with a pointer to an array in
vk_textures
with the size fromvk_const.h
.This is the only code that specifies the size of texture descriptors array to bind: https://github.com/w23/xash3d-fwgs/blob/258c3ec48e2da7ce1508b44c438c11f07c6882b5/ref/vk/vk_meatpipe.c#L216 It is a default value from
MAX_TEXTURES
specialization constant.What should be done, ideally: