#include "nvk_pipeline_layout.h"
#include "nir_builder.h"
+#include "nir_deref.h"
struct lower_descriptors_ctx {
const struct nvk_pipeline_layout *layout;
.align_mul = 16, .align_offset = 0, .range = ~0);
}
+ case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK: {
+ nir_ssa_def *base_addr =
+ nir_iadd_imm(b, load_descriptor_set_addr(b, set, ctx),
+ binding_layout->offset);
+
+ assert(binding_layout->stride == 1);
+ const uint32_t binding_size = binding_layout->array_size;
+
+ /* Convert it to nir_address_format_64bit_bounded_global */
+ assert(num_components == 4 && bit_size == 32);
+ return nir_vec4(b, nir_unpack_64_2x32_split_x(b, base_addr),
+ nir_unpack_64_2x32_split_y(b, base_addr),
+ nir_imm_int(b, binding_size),
+ nir_imm_int(b, 0));
+ }
+
default: {
assert(binding_layout->stride > 0);
nir_ssa_def *desc_ubo_offset =
VkPhysicalDeviceVulkan13Features core_1_3 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES,
/* Vulkan 1.3 features */
+ .inlineUniformBlock = true,
};
vk_foreach_struct(ext, pFeatures->pNext)
VkPhysicalDeviceVulkan13Properties core_1_3 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES,
/* Vulkan 1.3 properties */
+ .maxInlineUniformBlockSize = 1 << 16,
+ .maxPerStageDescriptorInlineUniformBlocks = 32,
};
vk_foreach_struct(ext, pProperties->pNext)
#endif
.KHR_variable_pointers = true,
.EXT_custom_border_color = true,
+ .EXT_inline_uniform_block = true,
};
}