mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
rsx: Fixes
- Fix section scanning range for early reject - Specify IMAGE_ASPECT_STENCIL when uploading image_from_cpu
This commit is contained in:
parent
dfc564f837
commit
d0148728c6
@ -115,21 +115,20 @@ namespace rsx
|
||||
void notify(u32 addr, u32 data_size)
|
||||
{
|
||||
verify(HERE), valid_count >= 0;
|
||||
max_range = std::max(data_size, max_range);
|
||||
|
||||
const u32 addr_base = addr & ~0xfff;
|
||||
const u32 block_sz = align(addr + data_size, 4096u) - addr_base;
|
||||
|
||||
max_range = std::max(max_range, block_sz);
|
||||
max_addr = std::max(max_addr, addr);
|
||||
min_addr = std::min(min_addr, addr);
|
||||
min_addr = std::min(min_addr, addr_base);
|
||||
valid_count++;
|
||||
}
|
||||
|
||||
void add(section_storage_type& section, u32 addr, u32 data_size)
|
||||
{
|
||||
verify(HERE), valid_count >= 0;
|
||||
max_range = std::max(data_size, max_range);
|
||||
max_addr = std::max(max_addr, addr);
|
||||
min_addr = std::min(min_addr, addr);
|
||||
valid_count++;
|
||||
|
||||
data.push_back(std::move(section));
|
||||
notify(addr, data_size);
|
||||
}
|
||||
|
||||
void remove_one()
|
||||
|
@ -518,6 +518,14 @@ namespace vk
|
||||
auto image = section->get_raw_texture();
|
||||
auto subres_range = section->get_raw_view()->info.subresourceRange;
|
||||
|
||||
switch (image->info.format)
|
||||
{
|
||||
case VK_FORMAT_D32_SFLOAT_S8_UINT:
|
||||
case VK_FORMAT_D24_UNORM_S8_UINT:
|
||||
subres_range.aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
break;
|
||||
}
|
||||
|
||||
change_image_layout(cmd, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, subres_range);
|
||||
|
||||
vk::enter_uninterruptible();
|
||||
|
Loading…
Reference in New Issue
Block a user