|
|
@ -110,6 +110,8 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size);
|
|
|
|
void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DisableGraphicsUniformBuffer(size_t stage, u32 index);
|
|
|
|
|
|
|
|
|
|
|
|
void UpdateGraphicsBuffers(bool is_indexed);
|
|
|
|
void UpdateGraphicsBuffers(bool is_indexed);
|
|
|
|
|
|
|
|
|
|
|
|
void UpdateComputeBuffers();
|
|
|
|
void UpdateComputeBuffers();
|
|
|
@ -419,10 +421,6 @@ template <class P>
|
|
|
|
void BufferCache<P>::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr,
|
|
|
|
void BufferCache<P>::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr,
|
|
|
|
u32 size) {
|
|
|
|
u32 size) {
|
|
|
|
const std::optional<VAddr> cpu_addr = gpu_memory.GpuToCpuAddress(gpu_addr);
|
|
|
|
const std::optional<VAddr> cpu_addr = gpu_memory.GpuToCpuAddress(gpu_addr);
|
|
|
|
if (!cpu_addr) {
|
|
|
|
|
|
|
|
uniform_buffers[stage][index] = NULL_BINDING;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const Binding binding{
|
|
|
|
const Binding binding{
|
|
|
|
.cpu_addr = *cpu_addr,
|
|
|
|
.cpu_addr = *cpu_addr,
|
|
|
|
.size = size,
|
|
|
|
.size = size,
|
|
|
@ -431,6 +429,11 @@ void BufferCache<P>::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr
|
|
|
|
uniform_buffers[stage][index] = binding;
|
|
|
|
uniform_buffers[stage][index] = binding;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <class P>
|
|
|
|
|
|
|
|
void BufferCache<P>::DisableGraphicsUniformBuffer(size_t stage, u32 index) {
|
|
|
|
|
|
|
|
uniform_buffers[stage][index] = NULL_BINDING;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <class P>
|
|
|
|
template <class P>
|
|
|
|
void BufferCache<P>::UpdateGraphicsBuffers(bool is_indexed) {
|
|
|
|
void BufferCache<P>::UpdateGraphicsBuffers(bool is_indexed) {
|
|
|
|
MICROPROFILE_SCOPE(GPU_PrepareBuffers);
|
|
|
|
MICROPROFILE_SCOPE(GPU_PrepareBuffers);
|
|
|
|