mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 20:14:45 +00:00
video_core: Hopefully fix some vertex explosions
This commit is contained in:
parent
3adca4513c
commit
270e89c3ea
6 changed files with 7 additions and 10 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <thread>
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
|
@ -560,7 +559,6 @@ int PS4_SYSV_ABI sceNetEpollDestroy() {
|
|||
}
|
||||
|
||||
int PS4_SYSV_ABI sceNetEpollWait() {
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(1));
|
||||
LOG_TRACE(Lib_Net, "(STUBBED) called");
|
||||
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) {
|
||||
boost::container::small_vector<ImageId, 8> image_ids;
|
||||
size = std::min(size, MaxInvalidateDist);
|
||||
texture_cache.ForEachImageInRegion(device_addr, size, [&](ImageId image_id, Image& image) {
|
||||
const u32 inv_size = std::min(size, MaxInvalidateDist);
|
||||
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) ||
|
||||
False(image.flags & ImageFlagBits::GpuModified)) {
|
||||
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;
|
||||
}
|
||||
image_ids.push_back(image_id);
|
||||
|
|
|
@ -179,8 +179,7 @@ const ComputePipeline* PipelineCache::GetComputePipeline() {
|
|||
}
|
||||
|
||||
bool ShouldSkipShader(u64 shader_hash, const char* shader_type) {
|
||||
static constexpr std::array<u64, 7> skip_hashes = {
|
||||
0x42f2a521, 0x2da7fe60, 0x8e3f8dc4, 0xa509af23, 0x4ca76892, 0xa954e79d, 0x1635154c};
|
||||
static constexpr std::array<u64, 0> skip_hashes = {};
|
||||
if (std::ranges::contains(skip_hashes, shader_hash)) {
|
||||
LOG_WARNING(Render_Vulkan, "Skipped {} shader hash {:#x}.", shader_type, shader_hash);
|
||||
return true;
|
||||
|
|
|
@ -117,7 +117,6 @@ struct Image {
|
|||
vk::ImageLayout layout = vk::ImageLayout::eUndefined;
|
||||
boost::container::small_vector<u64, 14> mip_hashes;
|
||||
u64 tick_accessed_last{0};
|
||||
u64 modification_tick{0};
|
||||
};
|
||||
|
||||
} // namespace VideoCore
|
||||
|
|
|
@ -220,7 +220,6 @@ ImageId TextureCache::FindImage(const ImageInfo& info, FindFlags flags) {
|
|||
|
||||
Image& image = slot_images[image_id];
|
||||
image.tick_accessed_last = scheduler.CurrentTick();
|
||||
image.modification_tick = ++modification_tick;
|
||||
|
||||
return image_id;
|
||||
}
|
||||
|
|
|
@ -212,7 +212,6 @@ private:
|
|||
tsl::robin_map<u64, Sampler> samplers;
|
||||
PageTable page_table;
|
||||
std::mutex mutex;
|
||||
u64 modification_tick{0};
|
||||
|
||||
struct MetaDataInfo {
|
||||
enum class Type {
|
||||
|
|
Loading…
Add table
Reference in a new issue