Merge pull request #11923 from iwubcode/multi-texture-compute-support

VideoBackends: support multiple compute images for some backends
This commit is contained in:
Admiral H. Curtiss
2023-07-01 17:47:55 +02:00
committed by GitHub
21 changed files with 107 additions and 59 deletions

View File

@ -61,7 +61,7 @@ public:
virtual void SetScissorRect(const MathUtil::Rectangle<int>& rc) {}
virtual void SetTexture(u32 index, const AbstractTexture* texture) {}
virtual void SetSamplerState(u32 index, const SamplerState& state) {}
virtual void SetComputeImageTexture(AbstractTexture* texture, bool read, bool write) {}
virtual void SetComputeImageTexture(u32 index, AbstractTexture* texture, bool read, bool write) {}
virtual void UnbindTexture(const AbstractTexture* texture) {}
virtual void SetViewport(float x, float y, float width, float height, float near_depth,
float far_depth)

View File

@ -8,4 +8,5 @@
namespace VideoCommon
{
constexpr u32 MAX_PIXEL_SHADER_SAMPLERS = 8;
}
constexpr u32 MAX_COMPUTE_SHADER_SAMPLERS = 8;
} // namespace VideoCommon

View File

@ -3009,7 +3009,7 @@ bool TextureCacheBase::DecodeTextureOnGPU(RcTcacheEntry& entry, u32 dst_level, c
aligned_height, src_offset, row_stride / bytes_per_buffer_elem,
palette_offset};
g_vertex_manager->UploadUtilityUniforms(&uniforms, sizeof(uniforms));
g_gfx->SetComputeImageTexture(m_decoding_texture.get(), false, true);
g_gfx->SetComputeImageTexture(0, m_decoding_texture.get(), false, true);
auto dispatch_groups =
TextureConversionShaderTiled::GetDispatchCount(info, aligned_width, aligned_height);