mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
vk: Force explicit minimum size declaration for scratch buffers
This commit is contained in:
parent
99bbcd15e1
commit
a4cd9e022a
@ -1955,7 +1955,7 @@ void VKGSRender::load_program_env()
|
|||||||
|
|
||||||
if (vk::emulate_conditional_rendering())
|
if (vk::emulate_conditional_rendering())
|
||||||
{
|
{
|
||||||
auto predicate = m_cond_render_buffer ? m_cond_render_buffer->value : vk::get_scratch_buffer()->value;
|
auto predicate = m_cond_render_buffer ? m_cond_render_buffer->value : vk::get_scratch_buffer(4)->value;
|
||||||
m_program->bind_buffer({ predicate, 0, 4 }, binding_table.conditional_render_predicate_slot, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, m_current_frame->descriptor_set);
|
m_program->bind_buffer({ predicate, 0, 4 }, binding_table.conditional_render_predicate_slot, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, m_current_frame->descriptor_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2558,7 +2558,7 @@ void VKGSRender::begin_conditional_rendering(const std::vector<rsx::reports::occ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto scratch = vk::get_scratch_buffer();
|
auto scratch = vk::get_scratch_buffer(OCCLUSION_MAX_POOL_SIZE * 4);
|
||||||
u32 dst_offset = 0;
|
u32 dst_offset = 0;
|
||||||
usz first = 0;
|
usz first = 0;
|
||||||
usz last;
|
usz last;
|
||||||
|
@ -544,7 +544,7 @@ namespace vk
|
|||||||
const auto dst_w = dst_rect.width();
|
const auto dst_w = dst_rect.width();
|
||||||
const auto dst_h = dst_rect.height();
|
const auto dst_h = dst_rect.height();
|
||||||
|
|
||||||
auto scratch_buf = vk::get_scratch_buffer();
|
auto scratch_buf = vk::get_scratch_buffer(std::max(src_w, dst_w) * std::max(src_h, dst_h) * 4);
|
||||||
|
|
||||||
//1. Copy unscaled to typeless surface
|
//1. Copy unscaled to typeless surface
|
||||||
VkBufferImageCopy info{};
|
VkBufferImageCopy info{};
|
||||||
|
@ -6,7 +6,7 @@ namespace vk
|
|||||||
VkSampler null_sampler();
|
VkSampler null_sampler();
|
||||||
image_view* null_image_view(command_buffer&, VkImageViewType type);
|
image_view* null_image_view(command_buffer&, VkImageViewType type);
|
||||||
image* get_typeless_helper(VkFormat format, rsx::format_class format_class, u32 requested_width, u32 requested_height);
|
image* get_typeless_helper(VkFormat format, rsx::format_class format_class, u32 requested_width, u32 requested_height);
|
||||||
buffer* get_scratch_buffer(u32 min_required_size = 0);
|
buffer* get_scratch_buffer(u32 min_required_size);
|
||||||
|
|
||||||
void clear_scratch_resources();
|
void clear_scratch_resources();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user