From 925586f97bb4a2f13b602d145cdd3aa00c7177fa Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 13 Jun 2023 00:32:16 -0400 Subject: buffer_cache_base: Specify buffer type in HostBindings Avoid reinterpret-casting from void pointer since the type is already known at compile time. --- src/video_core/buffer_cache/buffer_cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/video_core/buffer_cache/buffer_cache.h') diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 251a4a880..9bafd8cc0 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -715,7 +715,7 @@ void BufferCache

::BindHostIndexBuffer() { template void BufferCache

::BindHostVertexBuffers() { - HostBindings host_bindings; + HostBindings host_bindings; bool any_valid{false}; auto& flags = maxwell3d->dirty.flags; for (u32 index = 0; index < NUM_VERTEX_BUFFERS; ++index) { @@ -741,7 +741,7 @@ void BufferCache

::BindHostVertexBuffers() { const u32 stride = maxwell3d->regs.vertex_streams[index].stride; const u32 offset = buffer.Offset(binding.cpu_addr); - host_bindings.buffers.push_back(reinterpret_cast(&buffer)); + host_bindings.buffers.push_back(&buffer); host_bindings.offsets.push_back(offset); host_bindings.sizes.push_back(binding.size); host_bindings.strides.push_back(stride); @@ -900,7 +900,7 @@ void BufferCache

::BindHostTransformFeedbackBuffers() { if (maxwell3d->regs.transform_feedback_enabled == 0) { return; } - HostBindings host_bindings; + HostBindings host_bindings; for (u32 index = 0; index < NUM_TRANSFORM_FEEDBACK_BUFFERS; ++index) { const Binding& binding = channel_state->transform_feedback_buffers[index]; if (maxwell3d->regs.transform_feedback.controls[index].varying_count == 0 && @@ -913,7 +913,7 @@ void BufferCache

::BindHostTransformFeedbackBuffers() { SynchronizeBuffer(buffer, binding.cpu_addr, size); const u32 offset = buffer.Offset(binding.cpu_addr); - host_bindings.buffers.push_back(reinterpret_cast(&buffer)); + host_bindings.buffers.push_back(&buffer); host_bindings.offsets.push_back(offset); host_bindings.sizes.push_back(binding.size); } -- cgit v1.2.3