mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 07:52:31 +00:00
video_core: Hopefully fix some vertex explosions
This commit is contained in:
parent
3adca4513c
commit
270e89c3ea
@ -10,7 +10,6 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/libraries/error_codes.h"
|
#include "core/libraries/error_codes.h"
|
||||||
@ -560,7 +559,6 @@ int PS4_SYSV_ABI sceNetEpollDestroy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceNetEpollWait() {
|
int PS4_SYSV_ABI sceNetEpollWait() {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(1));
|
|
||||||
LOG_TRACE(Lib_Net, "(STUBBED) called");
|
LOG_TRACE(Lib_Net, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
@ -542,13 +542,16 @@ void BufferCache::SynchronizeBuffer(Buffer& buffer, VAddr device_addr, u32 size,
|
|||||||
|
|
||||||
bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, u32 size) {
|
bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, u32 size) {
|
||||||
boost::container::small_vector<ImageId, 8> image_ids;
|
boost::container::small_vector<ImageId, 8> image_ids;
|
||||||
size = std::min(size, MaxInvalidateDist);
|
const u32 inv_size = std::min(size, MaxInvalidateDist);
|
||||||
texture_cache.ForEachImageInRegion(device_addr, size, [&](ImageId image_id, Image& image) {
|
texture_cache.ForEachImageInRegion(device_addr, inv_size, [&](ImageId image_id, Image& image) {
|
||||||
|
// Only consider GPU modified images, i.e render targets or storage images.
|
||||||
|
// Also avoid any CPU modified images as the image data is likely to be stale.
|
||||||
if (True(image.flags & ImageFlagBits::CpuModified) ||
|
if (True(image.flags & ImageFlagBits::CpuModified) ||
|
||||||
False(image.flags & ImageFlagBits::GpuModified)) {
|
False(image.flags & ImageFlagBits::GpuModified)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (image.cpu_addr < device_addr || image.cpu_addr > device_addr + size) {
|
// Image must fully overlap with the provided buffer range.
|
||||||
|
if (image.cpu_addr < device_addr || image.cpu_addr_end > device_addr + size) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
image_ids.push_back(image_id);
|
image_ids.push_back(image_id);
|
||||||
|
@ -179,8 +179,7 @@ const ComputePipeline* PipelineCache::GetComputePipeline() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldSkipShader(u64 shader_hash, const char* shader_type) {
|
bool ShouldSkipShader(u64 shader_hash, const char* shader_type) {
|
||||||
static constexpr std::array<u64, 7> skip_hashes = {
|
static constexpr std::array<u64, 0> skip_hashes = {};
|
||||||
0x42f2a521, 0x2da7fe60, 0x8e3f8dc4, 0xa509af23, 0x4ca76892, 0xa954e79d, 0x1635154c};
|
|
||||||
if (std::ranges::contains(skip_hashes, shader_hash)) {
|
if (std::ranges::contains(skip_hashes, shader_hash)) {
|
||||||
LOG_WARNING(Render_Vulkan, "Skipped {} shader hash {:#x}.", shader_type, shader_hash);
|
LOG_WARNING(Render_Vulkan, "Skipped {} shader hash {:#x}.", shader_type, shader_hash);
|
||||||
return true;
|
return true;
|
||||||
|
@ -117,7 +117,6 @@ struct Image {
|
|||||||
vk::ImageLayout layout = vk::ImageLayout::eUndefined;
|
vk::ImageLayout layout = vk::ImageLayout::eUndefined;
|
||||||
boost::container::small_vector<u64, 14> mip_hashes;
|
boost::container::small_vector<u64, 14> mip_hashes;
|
||||||
u64 tick_accessed_last{0};
|
u64 tick_accessed_last{0};
|
||||||
u64 modification_tick{0};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VideoCore
|
} // namespace VideoCore
|
||||||
|
@ -220,7 +220,6 @@ ImageId TextureCache::FindImage(const ImageInfo& info, FindFlags flags) {
|
|||||||
|
|
||||||
Image& image = slot_images[image_id];
|
Image& image = slot_images[image_id];
|
||||||
image.tick_accessed_last = scheduler.CurrentTick();
|
image.tick_accessed_last = scheduler.CurrentTick();
|
||||||
image.modification_tick = ++modification_tick;
|
|
||||||
|
|
||||||
return image_id;
|
return image_id;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,6 @@ private:
|
|||||||
tsl::robin_map<u64, Sampler> samplers;
|
tsl::robin_map<u64, Sampler> samplers;
|
||||||
PageTable page_table;
|
PageTable page_table;
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
u64 modification_tick{0};
|
|
||||||
|
|
||||||
struct MetaDataInfo {
|
struct MetaDataInfo {
|
||||||
enum class Type {
|
enum class Type {
|
||||||
|
Loading…
Reference in New Issue
Block a user