mirror of https://github.com/RPCS3/rpcs3.git
rsx/gl/vk: Fix some warnings and whitespace issues (LF vs CRLF)
This commit is contained in:
parent
0cb6dee474
commit
75964c686f
|
@ -167,7 +167,7 @@ private:
|
|||
std::string glyph_data = character.substr(7);
|
||||
|
||||
glyph this_glyph;
|
||||
this_glyph.character = strtol(index.c_str(), nullptr, 16);
|
||||
this_glyph.character = (u8)strtol(index.c_str(), nullptr, 16);
|
||||
this_glyph.plot.reserve(16);
|
||||
|
||||
if (glyph_data.length() == 32)
|
||||
|
|
|
@ -783,8 +783,8 @@ namespace gl
|
|||
{
|
||||
protected:
|
||||
|
||||
u32 m_data_loc = 0;
|
||||
u32 m_limit = 0;
|
||||
GLsizeiptr m_data_loc = 0;
|
||||
GLsizeiptr m_limit = 0;
|
||||
void *m_memory_mapping = nullptr;
|
||||
|
||||
fence m_fence;
|
||||
|
@ -818,7 +818,7 @@ namespace gl
|
|||
|
||||
virtual std::pair<void*, u32> alloc_from_heap(u32 alloc_size, u16 alignment)
|
||||
{
|
||||
u32 offset = m_data_loc;
|
||||
u32 offset = (u32)m_data_loc;
|
||||
if (m_data_loc) offset = align(offset, alignment);
|
||||
|
||||
if ((offset + alloc_size) > m_limit)
|
||||
|
@ -873,8 +873,8 @@ namespace gl
|
|||
|
||||
class legacy_ring_buffer : public ring_buffer
|
||||
{
|
||||
u32 m_mapped_bytes = 0;
|
||||
u32 m_mapping_offset = 0;
|
||||
u64 m_mapped_bytes = 0;
|
||||
u64 m_mapping_offset = 0;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -66,14 +66,14 @@ namespace gl
|
|||
m_program.make();
|
||||
}
|
||||
|
||||
void load_program(float scale_x, float scale_y, float *offsets, int nb_offsets, color4f color)
|
||||
void load_program(float scale_x, float scale_y, float *offsets, size_t nb_offsets, color4f color)
|
||||
{
|
||||
float scale[] = { scale_x, scale_y };
|
||||
|
||||
m_program.use();
|
||||
|
||||
m_program.uniforms["draw_color"] = color;
|
||||
glProgramUniform2fv(m_program.id(), m_program.uniforms["offsets"].location(), nb_offsets, offsets);
|
||||
glProgramUniform2fv(m_program.id(), m_program.uniforms["offsets"].location(), (GLsizei)nb_offsets, offsets);
|
||||
glProgramUniform2fv(m_program.id(), m_program.uniforms["scale"].location(), 1, scale);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,11 +156,11 @@ private:
|
|||
u32 m_client_height = 0;
|
||||
|
||||
u32 m_draw_calls = 0;
|
||||
u32 m_setup_time = 0;
|
||||
u32 m_vertex_upload_time = 0;
|
||||
u32 m_textures_upload_time = 0;
|
||||
u32 m_draw_time = 0;
|
||||
u32 m_flip_time = 0;
|
||||
s64 m_setup_time = 0;
|
||||
s64 m_vertex_upload_time = 0;
|
||||
s64 m_textures_upload_time = 0;
|
||||
s64 m_draw_time = 0;
|
||||
s64 m_flip_time = 0;
|
||||
|
||||
u32 m_used_descriptors = 0;
|
||||
u8 m_draw_buffers_count = 0;
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace vk
|
|||
m_program = std::make_unique<vk::glsl::program>((VkDevice)dev, pipeline, unused, unused);
|
||||
}
|
||||
|
||||
void load_program(vk::command_buffer &cmd, float scale_x, float scale_y, float *offsets, int nb_offsets, std::array<float, 4> color)
|
||||
void load_program(vk::command_buffer &cmd, float scale_x, float scale_y, float *offsets, size_t nb_offsets, std::array<float, 4> color)
|
||||
{
|
||||
verify(HERE), m_used_descriptors < 120;
|
||||
|
||||
|
@ -216,7 +216,7 @@ namespace vk
|
|||
float *dst = (float*)m_uniforms_buffer->map(m_uniform_buffer_offset, 8192);
|
||||
|
||||
//std140 spec demands that arrays be multiples of 16 bytes
|
||||
for (int i = 0; i < nb_offsets; ++i)
|
||||
for (size_t i = 0; i < nb_offsets; ++i)
|
||||
{
|
||||
dst[i * 4] = offsets[i * 2];
|
||||
dst[i * 4 + 1] = offsets[i * 2 + 1];
|
||||
|
@ -265,7 +265,7 @@ namespace vk
|
|||
|
||||
GlyphManager glyph_source;
|
||||
auto points = glyph_source.generate_point_map();
|
||||
const u32 buffer_size = points.size() * sizeof(GlyphManager::glyph_point);
|
||||
const size_t buffer_size = points.size() * sizeof(GlyphManager::glyph_point);
|
||||
|
||||
u8 *dst = (u8*)m_vertex_buffer->map(0, buffer_size);
|
||||
memcpy(dst, points.data(), buffer_size);
|
||||
|
@ -329,8 +329,8 @@ namespace vk
|
|||
}
|
||||
|
||||
VkViewport vp{};
|
||||
vp.width = target_w;
|
||||
vp.height = target_h;
|
||||
vp.width = (f32)target_w;
|
||||
vp.height = (f32)target_h;
|
||||
vp.minDepth = 0.f;
|
||||
vp.maxDepth = 1.f;
|
||||
vkCmdSetViewport(cmd, 0, 1, &vp);
|
||||
|
|
Loading…
Reference in New Issue