mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-06 08:15:00 -06:00
Compare commits
No commits in common. "16cd1d7f94cca677a587877a6f2a968673e916e6" and "309396c1fdbfd7ba55d7ed75c677c8f6e47cb3ef" have entirely different histories.
16cd1d7f94
...
309396c1fd
@ -42,8 +42,7 @@ struct Archive {
|
||||
}
|
||||
|
||||
void Advance(size_t size) {
|
||||
ASSERT_MSG(offset + size <= container.size(),
|
||||
"Invalid or corrupted deserialization container/shader cache");
|
||||
ASSERT(offset + size <= container.size());
|
||||
offset += size;
|
||||
}
|
||||
|
||||
@ -105,8 +104,7 @@ struct Writer {
|
||||
struct Reader {
|
||||
template <typename T>
|
||||
void Read(T* ptr, size_t size) {
|
||||
ASSERT_MSG(ar.offset + size <= ar.container.size(),
|
||||
"Invalid or corrupted deserialization container/shader cache");
|
||||
ASSERT(ar.offset + size <= ar.container.size());
|
||||
std::memcpy(reinterpret_cast<void*>(ptr), ar.CurrPtr(), size);
|
||||
ar.Advance(size);
|
||||
}
|
||||
|
||||
@ -1219,10 +1219,6 @@ void ImGuiImplVulkanDestroyDeviceObjects() {
|
||||
v.device.destroyDescriptorSetLayout(bd->descriptor_set_layout, v.allocator);
|
||||
bd->descriptor_set_layout = VK_NULL_HANDLE;
|
||||
}
|
||||
if (bd->descriptor_pool) {
|
||||
v.device.destroyDescriptorPool(bd->descriptor_pool, v.allocator);
|
||||
bd->descriptor_pool = VK_NULL_HANDLE;
|
||||
}
|
||||
if (bd->pipeline_layout) {
|
||||
v.device.destroyPipelineLayout(bd->pipeline_layout, v.allocator);
|
||||
bd->pipeline_layout = VK_NULL_HANDLE;
|
||||
|
||||
@ -45,14 +45,6 @@ CopyShaderData ParseCopyShader(std::span<const u32> code) {
|
||||
sources[inst.dst[0].code] += inst.control.sopk.simm;
|
||||
break;
|
||||
}
|
||||
case Gcn::Opcode::S_BFM_B32: {
|
||||
ASSERT(inst.src[0].field == Gcn::OperandField::SignedConstIntPos &&
|
||||
inst.src[1].field == Gcn::OperandField::SignedConstIntPos);
|
||||
const auto src0 = inst.src[0].code - Gcn::OperandFieldRange::SignedConstIntPosMin + 1;
|
||||
const auto src1 = inst.src[1].code - Gcn::OperandFieldRange::SignedConstIntPosMin + 1;
|
||||
sources[inst.dst[0].code] = ((1 << src0) - 1) << src1;
|
||||
break;
|
||||
}
|
||||
case Gcn::Opcode::EXP: {
|
||||
const auto& exp = inst.control.exp;
|
||||
const IR::Attribute semantic = static_cast<IR::Attribute>(exp.target);
|
||||
@ -79,7 +71,6 @@ CopyShaderData ParseCopyShader(std::span<const u32> code) {
|
||||
ASSERT(sources[index] != -1);
|
||||
offsets[inst.src[1].code] += sources[index];
|
||||
}
|
||||
data.num_comps++;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@ -15,7 +15,6 @@ struct CopyShaderData {
|
||||
std::map<u32, std::pair<Shader::IR::Attribute, u32>> attr_map;
|
||||
u32 num_attrs{0};
|
||||
u32 output_vertices{0};
|
||||
u32 num_comps{0};
|
||||
};
|
||||
|
||||
CopyShaderData ParseCopyShader(std::span<const u32> code);
|
||||
|
||||
@ -104,13 +104,6 @@ void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtim
|
||||
output_vertices, info.gs_copy_data.output_vertices);
|
||||
output_vertices = info.gs_copy_data.output_vertices;
|
||||
}
|
||||
u32 dwords_per_vertex = gs_info.out_vertex_data_size;
|
||||
if (info.gs_copy_data.num_comps && info.gs_copy_data.num_comps != dwords_per_vertex) {
|
||||
LOG_WARNING(Render_Vulkan,
|
||||
"VERT_ITEMSIZE {} is different than actual number of dwords per vertex {}",
|
||||
dwords_per_vertex, info.gs_copy_data.num_comps);
|
||||
dwords_per_vertex = info.gs_copy_data.num_comps;
|
||||
}
|
||||
|
||||
ForEachInstruction([&](IR::IREmitter& ir, IR::Inst& inst) {
|
||||
const auto opcode = inst.GetOpcode();
|
||||
@ -146,7 +139,7 @@ void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtim
|
||||
const auto offset = inst.Flags<IR::BufferInstInfo>().inst_offset.Value();
|
||||
const auto data = ir.BitCast<IR::F32>(IR::U32{inst.Arg(2)});
|
||||
const auto comp_ofs = output_vertices * 4u;
|
||||
const auto output_size = comp_ofs * dwords_per_vertex;
|
||||
const auto output_size = comp_ofs * gs_info.out_vertex_data_size;
|
||||
|
||||
const auto vc_read_ofs = (((offset / comp_ofs) * comp_ofs) % output_size) * 16u;
|
||||
const auto& it = info.gs_copy_data.attr_map.find(vc_read_ofs);
|
||||
|
||||
@ -261,12 +261,6 @@ void Swapchain::Destroy() {
|
||||
LOG_WARNING(Render_Vulkan, "Failed to wait for device to become idle: {}",
|
||||
vk::to_string(wait_result));
|
||||
}
|
||||
|
||||
for (auto& image_view : images_view) {
|
||||
device.destroyImageView(image_view);
|
||||
}
|
||||
images_view.clear();
|
||||
|
||||
if (swapchain) {
|
||||
device.destroySwapchainKHR(swapchain);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user