mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
rsx: use more const ref
This commit is contained in:
parent
da273761d1
commit
09ab5477e8
7 changed files with 12 additions and 12 deletions
|
@ -569,7 +569,7 @@ void GLGSRender::emit_geometry(u32 sub_index)
|
|||
if (vertex_state && !m_vertex_layout.validate())
|
||||
{
|
||||
// No vertex inputs enabled
|
||||
// Execute remainining pipeline barriers with NOP draw
|
||||
// Execute remaining pipeline barriers with NOP draw
|
||||
do
|
||||
{
|
||||
draw_call.execute_pipeline_dependencies(m_ctx);
|
||||
|
@ -619,9 +619,9 @@ void GLGSRender::emit_geometry(u32 sub_index)
|
|||
}
|
||||
else
|
||||
{
|
||||
const auto subranges = draw_call.get_subranges();
|
||||
const auto& subranges = draw_call.get_subranges();
|
||||
const auto draw_count = subranges.size();
|
||||
const auto driver_caps = gl::get_driver_caps();
|
||||
const auto& driver_caps = gl::get_driver_caps();
|
||||
bool use_draw_arrays_fallback = false;
|
||||
|
||||
m_scratch_buffer.resize(draw_count * 24);
|
||||
|
@ -631,7 +631,7 @@ void GLGSRender::emit_geometry(u32 sub_index)
|
|||
|
||||
u32 first = 0;
|
||||
u32 dst_index = 0;
|
||||
for (const auto &range : subranges)
|
||||
for (const auto& range : subranges)
|
||||
{
|
||||
firsts[dst_index] = first;
|
||||
counts[dst_index] = range.count;
|
||||
|
|
|
@ -33,7 +33,7 @@ void GLFragmentDecompilerThread::insertHeader(std::stringstream & OS)
|
|||
|
||||
if (device_props.has_native_half_support)
|
||||
{
|
||||
const auto driver_caps = gl::get_driver_caps();
|
||||
const auto& driver_caps = gl::get_driver_caps();
|
||||
if (driver_caps.NV_gpu_shader5_supported)
|
||||
{
|
||||
required_extensions.push_back("GL_NV_gpu_shader5");
|
||||
|
@ -47,7 +47,7 @@ void GLFragmentDecompilerThread::insertHeader(std::stringstream & OS)
|
|||
if (properties.multisampled_sampler_mask)
|
||||
{
|
||||
// Requires this extension or GLSL 450
|
||||
const auto driver_caps = gl::get_driver_caps();
|
||||
const auto& driver_caps = gl::get_driver_caps();
|
||||
if (driver_caps.glsl_version.version >= 450)
|
||||
{
|
||||
gl_version = 450;
|
||||
|
@ -366,7 +366,7 @@ void GLFragmentProgram::Decompile(const RSXFragmentProgram& prog)
|
|||
|
||||
if (g_cfg.video.shader_precision == gpu_preset_level::low)
|
||||
{
|
||||
const auto driver_caps = gl::get_driver_caps();
|
||||
const auto& driver_caps = gl::get_driver_caps();
|
||||
decompiler.device_props.has_native_half_support = driver_caps.NV_gpu_shader5_supported || driver_caps.AMD_gpu_shader_half_float_supported;
|
||||
decompiler.device_props.has_low_precision_rounding = driver_caps.vendor_NVIDIA;
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ void GLGSRender::on_init_thread()
|
|||
rsx_log.success("GL VERSION: %s", reinterpret_cast<const char*>(glGetString(GL_VERSION)));
|
||||
rsx_log.success("GLSL VERSION: %s", reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION)));
|
||||
|
||||
auto& gl_caps = gl::get_driver_caps();
|
||||
const auto& gl_caps = gl::get_driver_caps();
|
||||
|
||||
std::vector<std::string> exception_reasons;
|
||||
if (!gl_caps.ARB_texture_buffer_object_supported)
|
||||
|
|
|
@ -582,7 +582,7 @@ namespace gl
|
|||
const std::vector<rsx::subresource_layout> &input_layouts,
|
||||
bool is_swizzled, GLenum gl_format, GLenum gl_type, rsx::simple_array<std::byte>& staging_buffer)
|
||||
{
|
||||
const auto driver_caps = gl::get_driver_caps();
|
||||
const auto& driver_caps = gl::get_driver_caps();
|
||||
rsx::texture_uploader_capabilities caps
|
||||
{
|
||||
.supports_byteswap = true,
|
||||
|
|
|
@ -565,7 +565,7 @@ VKGSRender::VKGSRender(utils::serial* ar) noexcept : GSRender(ar)
|
|||
m_fragment_texture_params_buffer_info = { m_fragment_texture_params_ring_info.heap->value, 0, 16 };
|
||||
m_raster_env_buffer_info = { m_raster_env_ring_info.heap->value, 0, 128 };
|
||||
|
||||
const auto limits = m_device->gpu().get_limits();
|
||||
const auto& limits = m_device->gpu().get_limits();
|
||||
m_texbuffer_view_size = std::min(limits.maxTexelBufferElements, VK_ATTRIB_RING_BUFFER_SIZE_M * 0x100000u);
|
||||
|
||||
if (m_texbuffer_view_size < 0x800000)
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace vk
|
|||
{
|
||||
// For any managed resources, try to keep the number of unused/idle resources as low as possible.
|
||||
// Improves search times as well as keeping us below the hardware limit.
|
||||
const auto limits = get_current_renderer()->gpu().get_limits();
|
||||
const auto& limits = get_current_renderer()->gpu().get_limits();
|
||||
const auto allocated_sampler_count = vmm_get_application_pool_usage(VMM_ALLOCATION_POOL_SAMPLER);
|
||||
const auto max_allowed_samplers = std::min((limits.maxSamplerAllocationCount * 3u) / 4u, 2048u);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace vk
|
|||
{
|
||||
void image::validate(const vk::render_device& dev, const VkImageCreateInfo& info) const
|
||||
{
|
||||
const auto gpu_limits = dev.gpu().get_limits();
|
||||
const auto& gpu_limits = dev.gpu().get_limits();
|
||||
u32 longest_dim, dim_limit;
|
||||
|
||||
switch (info.imageType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue