"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/amd/vulkan/radv_descriptor_set.c" between
mesa-19.1.3.tar.xz and mesa-19.1.4.tar.xz

About: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics (main library code). Latest release.

radv_descriptor_set.c  (mesa-19.1.3.tar.xz):radv_descriptor_set.c  (mesa-19.1.4.tar.xz)
skipping to change at line 477 skipping to change at line 477
#define EMPTY 1 #define EMPTY 1
static VkResult static VkResult
radv_descriptor_set_create(struct radv_device *device, radv_descriptor_set_create(struct radv_device *device,
struct radv_descriptor_pool *pool, struct radv_descriptor_pool *pool,
const struct radv_descriptor_set_layout *layout, const struct radv_descriptor_set_layout *layout,
const uint32_t *variable_count, const uint32_t *variable_count,
struct radv_descriptor_set **out_set) struct radv_descriptor_set **out_set)
{ {
struct radv_descriptor_set *set; struct radv_descriptor_set *set;
uint32_t buffer_count = layout->buffer_count;
if (variable_count) {
unsigned stride = 1;
if (layout->binding[layout->binding_count - 1].type == VK_DESCRIP
TOR_TYPE_SAMPLER ||
layout->binding[layout->binding_count - 1].type == VK_DESCRIP
TOR_TYPE_INLINE_UNIFORM_BLOCK_EXT)
stride = 0;
buffer_count = layout->binding[layout->binding_count - 1].buffer_
offset +
*variable_count * stride;
}
unsigned range_offset = sizeof(struct radv_descriptor_set) + unsigned range_offset = sizeof(struct radv_descriptor_set) +
sizeof(struct radeon_winsys_bo *) * layout->buffer_count; sizeof(struct radeon_winsys_bo *) * buffer_count;
unsigned mem_size = range_offset + unsigned mem_size = range_offset +
sizeof(struct radv_descriptor_range) * layout->dynamic_offset_cou nt; sizeof(struct radv_descriptor_range) * layout->dynamic_offset_cou nt;
if (pool->host_memory_base) { if (pool->host_memory_base) {
if (pool->host_memory_end - pool->host_memory_ptr < mem_size) if (pool->host_memory_end - pool->host_memory_ptr < mem_size)
return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_ME MORY); return vk_error(device->instance, VK_ERROR_OUT_OF_POOL_ME MORY);
set = (struct radv_descriptor_set*)pool->host_memory_ptr; set = (struct radv_descriptor_set*)pool->host_memory_ptr;
pool->host_memory_ptr += mem_size; pool->host_memory_ptr += mem_size;
} else { } else {
skipping to change at line 787 skipping to change at line 796
assert(!(layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DES CRIPTOR_BIT_KHR)); assert(!(layout->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DES CRIPTOR_BIT_KHR));
result = radv_descriptor_set_create(device, pool, layout, variabl e_count, &set); result = radv_descriptor_set_create(device, pool, layout, variabl e_count, &set);
if (result != VK_SUCCESS) if (result != VK_SUCCESS)
break; break;
pDescriptorSets[i] = radv_descriptor_set_to_handle(set); pDescriptorSets[i] = radv_descriptor_set_to_handle(set);
} }
if (result != VK_SUCCESS) if (result != VK_SUCCESS) {
radv_FreeDescriptorSets(_device, pAllocateInfo->descriptorPool, radv_FreeDescriptorSets(_device, pAllocateInfo->descriptorPool,
i, pDescriptorSets); i, pDescriptorSets);
for (i = 0; i < pAllocateInfo->descriptorSetCount; i++) {
pDescriptorSets[i] = VK_NULL_HANDLE;
}
}
return result; return result;
} }
VkResult radv_FreeDescriptorSets( VkResult radv_FreeDescriptorSets(
VkDevice _device, VkDevice _device,
VkDescriptorPool descriptorPool, VkDescriptorPool descriptorPool,
uint32_t count, uint32_t count,
const VkDescriptorSet* pDescriptorSets) const VkDescriptorSet* pDescriptorSets)
{ {
RADV_FROM_HANDLE(radv_device, device, _device); RADV_FROM_HANDLE(radv_device, device, _device);
 End of changes. 4 change blocks. 
2 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)