mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-19 19:15:26 +00:00
rsx: Bypass sampling cache logic when dealing with host generated textures
This commit is contained in:
parent
40ff182c31
commit
ba7b7b65a1
4 changed files with 7 additions and 5 deletions
|
@ -145,8 +145,6 @@ class GLGSRender : public GSRender, public ::rsx::reports::ZCULL_control
|
|||
|
||||
shared_mutex m_sampler_mutex;
|
||||
atomic_t<bool> m_samplers_dirty = {true};
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::fragment_textures_count> fs_sampler_state = {};
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::vertex_textures_count> vs_sampler_state = {};
|
||||
std::unordered_map<GLenum, std::unique_ptr<gl::texture>> m_null_textures;
|
||||
rsx::simple_array<u8> m_scratch_buffer;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "Emu/RSX/Common/TextureUtils.h"
|
||||
#include "Emu/RSX/RSXThread.h"
|
||||
|
||||
#define RSX(ctx) ctx->rsxthr
|
||||
|
@ -100,7 +101,9 @@ namespace rsx
|
|||
ensure(!command_span.empty() && command_span.size() <= count);
|
||||
|
||||
u32* const dst_regs = ®S(ctx)->registers[reg];
|
||||
bool set_dirty = (dst_regs[0] != REGS(ctx)->latch);
|
||||
bool set_dirty = (dst_regs[0] != REGS(ctx)->latch) ||
|
||||
(RSX(ctx)->fs_sampler_state[texture_index] &&
|
||||
RSX(ctx)->fs_sampler_state[texture_index]->upload_context != rsx::texture_upload_context::shader_read);
|
||||
|
||||
for (usz i = 1; i < command_span.size(); i++)
|
||||
{
|
||||
|
|
|
@ -248,6 +248,9 @@ namespace rsx
|
|||
program_hash_util::fragment_program_utils::fragment_program_metadata current_fp_metadata = {};
|
||||
program_hash_util::vertex_program_utils::vertex_program_metadata current_vp_metadata = {};
|
||||
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::fragment_textures_count> fs_sampler_state = {};
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::vertex_textures_count> vs_sampler_state = {};
|
||||
|
||||
std::array<u32, 4> get_color_surface_addresses() const;
|
||||
u32 get_zeta_surface_address() const;
|
||||
|
||||
|
|
|
@ -81,8 +81,6 @@ private:
|
|||
shared_mutex m_sampler_mutex;
|
||||
atomic_t<bool> m_samplers_dirty = { true };
|
||||
std::unique_ptr<vk::sampler> m_stencil_mirror_sampler;
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::fragment_textures_count> fs_sampler_state = {};
|
||||
std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::vertex_textures_count> vs_sampler_state = {};
|
||||
std::array<vk::sampler*, rsx::limits::fragment_textures_count> fs_sampler_handles{};
|
||||
std::array<vk::sampler*, rsx::limits::vertex_textures_count> vs_sampler_handles{};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue