mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-20 10:21:09 +00:00
silence warnings in RSX stuff
This commit is contained in:
parent
8276d29d4f
commit
3a9ae2df9e
@ -38,8 +38,8 @@ namespace
|
||||
{
|
||||
const __m128i mask = _mm_set_epi8(
|
||||
0xC, 0xD, 0xE, 0xF,
|
||||
0x8, 0x9, 0xA, 0xB,
|
||||
0x4, 0x5, 0x6, 0x7,
|
||||
0x8, 0x9, 0xA, 0xB,
|
||||
0x4, 0x5, 0x6, 0x7,
|
||||
0x0, 0x1, 0x2, 0x3);
|
||||
|
||||
__m128i* dst_ptr = (__m128i*)dst;
|
||||
@ -48,7 +48,7 @@ namespace
|
||||
const u32 dword_count = (vertex_count * (stride >> 2));
|
||||
const u32 iterations = dword_count >> 2;
|
||||
const u32 remaining = dword_count % 4;
|
||||
|
||||
|
||||
for (u32 i = 0; i < iterations; ++i)
|
||||
{
|
||||
u32 *src_words = (u32*)src_ptr;
|
||||
@ -121,7 +121,7 @@ namespace
|
||||
|
||||
//Count vertices to copy
|
||||
const bool is_128_aligned = !((dst_stride | src_stride) & 15);
|
||||
|
||||
|
||||
u32 min_block_size = std::min(src_stride, dst_stride);
|
||||
if (min_block_size == 0) min_block_size = dst_stride;
|
||||
|
||||
@ -382,9 +382,9 @@ void write_vertex_array_data_to_buffer(gsl::span<gsl::byte> raw_dst_span, gsl::s
|
||||
|
||||
const u64 src_address = (u64)src_ptr.data();
|
||||
const bool sse_aligned = ((src_address & 15) == 0);
|
||||
|
||||
|
||||
#if !DEBUG_VERTEX_STREAMING
|
||||
|
||||
|
||||
if (real_count >= count || real_count == 1)
|
||||
{
|
||||
if (attribute_src_stride == dst_stride && src_read_stride == dst_stride)
|
||||
@ -604,7 +604,10 @@ bool is_primitive_native(rsx::primitive_type draw_mode)
|
||||
case rsx::primitive_type::triangle_fan:
|
||||
case rsx::primitive_type::quads:
|
||||
return false;
|
||||
case rsx::primitive_type::invalid:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt::throw_exception("Wrong primitive type" HERE);
|
||||
}
|
||||
|
||||
@ -682,7 +685,11 @@ void write_index_array_for_non_indexed_non_native_primitive_to_buffer(char* dst,
|
||||
case rsx::primitive_type::triangles:
|
||||
case rsx::primitive_type::triangle_strip:
|
||||
fmt::throw_exception("Native primitive type doesn't require expansion" HERE);
|
||||
case rsx::primitive_type::invalid:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt::throw_exception("Tried to load invalid primitive type" HERE);
|
||||
}
|
||||
|
||||
|
||||
@ -725,8 +732,9 @@ namespace
|
||||
return expand_indexed_triangle_fan<T>(src, dst, restart_index_enabled, restart_index);
|
||||
case rsx::primitive_type::quads:
|
||||
return expand_indexed_quads<T>(src, dst, restart_index_enabled, restart_index);
|
||||
default:
|
||||
fmt::throw_exception("Unknown draw mode (0x%x)" HERE, (u32)draw_mode);
|
||||
}
|
||||
fmt::throw_exception("Unknown draw mode (0x%x)" HERE, (u32)draw_mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,8 @@ public:
|
||||
for (auto& e : patch_table.db)
|
||||
{
|
||||
//TODO: Use fp comparison with fabsf without hurting performance
|
||||
if (patched = e.second.test_and_set(tmp[i], &dst[i]))
|
||||
patched = e.second.test_and_set(tmp[i], &dst[i]);
|
||||
if (patched)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ namespace rsx
|
||||
class texture_cache
|
||||
{
|
||||
private:
|
||||
std::pair<std::array<u8, 4>, std::array<u8, 4>> default_remap_vector =
|
||||
std::pair<std::array<u8, 4>, std::array<u8, 4>> default_remap_vector =
|
||||
{
|
||||
{ CELL_GCM_TEXTURE_REMAP_FROM_A, CELL_GCM_TEXTURE_REMAP_FROM_R, CELL_GCM_TEXTURE_REMAP_FROM_G, CELL_GCM_TEXTURE_REMAP_FROM_B },
|
||||
{ CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP }
|
||||
@ -271,12 +271,12 @@ namespace rsx
|
||||
|
||||
//Set when a hw blit engine incompatibility is detected
|
||||
bool blit_engine_incompatibility_warning_raised = false;
|
||||
|
||||
|
||||
//Memory usage
|
||||
const s32 m_max_zombie_objects = 64; //Limit on how many texture objects to keep around for reuse after they are invalidated
|
||||
std::atomic<s32> m_unreleased_texture_objects = { 0 }; //Number of invalidated objects not yet freed from memory
|
||||
std::atomic<u32> m_texture_memory_in_use = { 0 };
|
||||
|
||||
|
||||
/* Helpers */
|
||||
virtual void free_texture_section(section_storage_type&) = 0;
|
||||
virtual image_view_type create_temporary_subresource_view(commandbuffer_type&, image_resource_type* src, u32 gcm_format, u16 x, u16 y, u16 w, u16 h) = 0;
|
||||
@ -606,7 +606,7 @@ namespace rsx
|
||||
|
||||
texture_cache() {}
|
||||
~texture_cache() {}
|
||||
|
||||
|
||||
virtual void destroy() = 0;
|
||||
virtual bool is_depth_texture(const u32, const u32) = 0;
|
||||
virtual void on_frame_end() = 0;
|
||||
@ -768,7 +768,7 @@ namespace rsx
|
||||
region->copy_texture(false, std::forward<Args>(extra)...);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template <typename ...Args>
|
||||
bool load_memory_from_cache(const u32 memory_address, const u32 memory_size, Args&&... extras)
|
||||
{
|
||||
@ -970,7 +970,7 @@ namespace rsx
|
||||
value.misses--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void purge_dirty()
|
||||
{
|
||||
writer_lock lock(m_cache_mutex);
|
||||
@ -1001,7 +1001,7 @@ namespace rsx
|
||||
{
|
||||
m_cache.erase(address);
|
||||
}
|
||||
|
||||
|
||||
m_unreleased_texture_objects = 0;
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,9 @@ namespace gl
|
||||
case rsx::primitive_type::quads: return GL_TRIANGLES;
|
||||
case rsx::primitive_type::quad_strip: return GL_TRIANGLE_STRIP;
|
||||
case rsx::primitive_type::polygon: return GL_TRIANGLES;
|
||||
default:
|
||||
fmt::throw_exception("unknown primitive type" HERE);
|
||||
}
|
||||
fmt::throw_exception("unknow primitive type" HERE);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
@ -320,6 +321,9 @@ namespace gl
|
||||
case texture::internal_format::compressed_rgba_s3tc_dxt5:
|
||||
compressed_image_size = ((m_width + 3) / 4) * ((m_height + 3) / 4) * 16;
|
||||
break;
|
||||
default:
|
||||
fmt::throw_exception("Tried to load unimplemented internal_format type." HERE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -549,7 +553,8 @@ namespace gl
|
||||
case rsx::primitive_type::quads:
|
||||
case rsx::primitive_type::polygon:
|
||||
return false;
|
||||
default:
|
||||
fmt::throw_exception("unknown primitive type" HERE);
|
||||
}
|
||||
fmt::throw_exception("unknown primitive type" HERE);
|
||||
}
|
||||
}
|
||||
|
@ -1379,9 +1379,9 @@ namespace gl
|
||||
case internal_format::compressed_rgba_s3tc_dxt3:
|
||||
case internal_format::compressed_rgba_s3tc_dxt5:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint id() const noexcept
|
||||
@ -1964,6 +1964,8 @@ namespace gl
|
||||
case texture::target::texture1D: glFramebufferTexture1D(GL_FRAMEBUFFER, m_id, GL_TEXTURE_1D, rhs.id(), rhs.level()); break;
|
||||
case texture::target::texture2D: glFramebufferTexture2D(GL_FRAMEBUFFER, m_id, GL_TEXTURE_2D, rhs.id(), rhs.level()); break;
|
||||
case texture::target::texture3D: glFramebufferTexture3D(GL_FRAMEBUFFER, m_id, GL_TEXTURE_3D, rhs.id(), rhs.level(), 0); break;
|
||||
case texture::target::textureBuffer:
|
||||
fmt::throw_exception("Tried to assign unsupported texture of type textureBuffer to fbo." HERE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2162,9 +2164,12 @@ namespace gl
|
||||
const GLint length = (GLint)src.length();
|
||||
|
||||
{
|
||||
std::string base_name = "shaderlog/VertexProgram";
|
||||
std::string base_name;
|
||||
switch (shader_type)
|
||||
{
|
||||
case type::vertex:
|
||||
base_name = "shaderlog/VertexProgram";
|
||||
break;
|
||||
case type::fragment:
|
||||
base_name = "shaderlog/FragmentProgram";
|
||||
break;
|
||||
|
@ -134,6 +134,8 @@ namespace gl
|
||||
case texture::type::uint:
|
||||
size = 4;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(RSX, "Unsupported texture type");
|
||||
}
|
||||
|
||||
switch (fmt_)
|
||||
|
@ -495,7 +495,7 @@ namespace rsx
|
||||
//Validate put and get registers
|
||||
//TODO: Who should handle graphics exceptions??
|
||||
const u32 get_address = RSXIOMem.RealAddr(internal_get);
|
||||
|
||||
|
||||
if (!get_address)
|
||||
{
|
||||
LOG_ERROR(RSX, "Invalid FIFO queue get/put registers found, get=0x%X, put=0x%X", internal_get.load(), put);
|
||||
@ -1074,9 +1074,9 @@ namespace rsx
|
||||
case rsx::vertex_base_type::s32k:
|
||||
case rsx::vertex_base_type::ub256:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1574,7 +1574,7 @@ namespace rsx
|
||||
|
||||
GcmTileInfo *tile = find_tile(offset, location);
|
||||
u32 base = 0;
|
||||
|
||||
|
||||
if (tile)
|
||||
{
|
||||
base = offset - tile->offset;
|
||||
@ -1587,7 +1587,7 @@ namespace rsx
|
||||
u32 thread::ReadIO32(u32 addr)
|
||||
{
|
||||
u32 value;
|
||||
|
||||
|
||||
if (!RSXIOMem.Read32(addr, &value))
|
||||
{
|
||||
fmt::throw_exception("%s(addr=0x%x): RSXIO memory not mapped" HERE, __FUNCTION__, addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user