diff options
| author | 2016-05-07 17:24:16 -0400 | |
|---|---|---|
| committer | 2016-05-07 17:24:16 -0400 | |
| commit | 6abc6003f50cbaec555516bbaf8fce5bbecb2ff1 (patch) | |
| tree | 18ae5ec147f016b62e73d1de683d453c50407034 /src/video_core | |
| parent | Merge pull request #1761 from Subv/applets_fb (diff) | |
| parent | fixup simple type conversions where possible (diff) | |
| download | yuzu-6abc6003f50cbaec555516bbaf8fce5bbecb2ff1.tar.gz yuzu-6abc6003f50cbaec555516bbaf8fce5bbecb2ff1.tar.xz yuzu-6abc6003f50cbaec555516bbaf8fce5bbecb2ff1.zip | |
Merge pull request #1718 from alex-laties/fixup-type-conversions
fixup simple type conversions where possible
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/pica_state.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index fb20f81dd..2f645b441 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -208,11 +208,12 @@ void DumpShader(const std::string& filename, const Regs::ShaderConfig& config, c | |||
| 208 | 208 | ||
| 209 | // TODO: Reduce the amount of binary code written to relevant portions | 209 | // TODO: Reduce the amount of binary code written to relevant portions |
| 210 | dvlp.binary_offset = write_offset - dvlp_offset; | 210 | dvlp.binary_offset = write_offset - dvlp_offset; |
| 211 | dvlp.binary_size_words = setup.program_code.size(); | 211 | dvlp.binary_size_words = static_cast<uint32_t>(setup.program_code.size()); |
| 212 | QueueForWriting(reinterpret_cast<const u8*>(setup.program_code.data()), setup.program_code.size() * sizeof(u32)); | 212 | QueueForWriting(reinterpret_cast<const u8*>(setup.program_code.data()), |
| 213 | static_cast<u32>(setup.program_code.size()) * sizeof(u32)); | ||
| 213 | 214 | ||
| 214 | dvlp.swizzle_info_offset = write_offset - dvlp_offset; | 215 | dvlp.swizzle_info_offset = write_offset - dvlp_offset; |
| 215 | dvlp.swizzle_info_num_entries = setup.swizzle_data.size(); | 216 | dvlp.swizzle_info_num_entries = static_cast<uint32_t>(setup.swizzle_data.size()); |
| 216 | u32 dummy = 0; | 217 | u32 dummy = 0; |
| 217 | for (unsigned int i = 0; i < setup.swizzle_data.size(); ++i) { | 218 | for (unsigned int i = 0; i < setup.swizzle_data.size(); ++i) { |
| 218 | QueueForWriting(reinterpret_cast<const u8*>(&setup.swizzle_data[i]), sizeof(setup.swizzle_data[i])); | 219 | QueueForWriting(reinterpret_cast<const u8*>(&setup.swizzle_data[i]), sizeof(setup.swizzle_data[i])); |
| @@ -264,7 +265,7 @@ void DumpShader(const std::string& filename, const Regs::ShaderConfig& config, c | |||
| 264 | constant_table.emplace_back(constant); | 265 | constant_table.emplace_back(constant); |
| 265 | } | 266 | } |
| 266 | dvle.constant_table_offset = write_offset - dvlb.dvle_offset; | 267 | dvle.constant_table_offset = write_offset - dvlb.dvle_offset; |
| 267 | dvle.constant_table_size = constant_table.size(); | 268 | dvle.constant_table_size = static_cast<uint32_t>(constant_table.size()); |
| 268 | for (const auto& constant : constant_table) { | 269 | for (const auto& constant : constant_table) { |
| 269 | QueueForWriting(reinterpret_cast<const u8*>(&constant), sizeof(constant)); | 270 | QueueForWriting(reinterpret_cast<const u8*>(&constant), sizeof(constant)); |
| 270 | } | 271 | } |
diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h index bbecad850..1059c6ae4 100644 --- a/src/video_core/pica_state.h +++ b/src/video_core/pica_state.h | |||
| @@ -56,7 +56,7 @@ struct State { | |||
| 56 | // Used to buffer partial vertices for immediate-mode rendering. | 56 | // Used to buffer partial vertices for immediate-mode rendering. |
| 57 | Shader::InputVertex input_vertex; | 57 | Shader::InputVertex input_vertex; |
| 58 | // Index of the next attribute to be loaded into `input_vertex`. | 58 | // Index of the next attribute to be loaded into `input_vertex`. |
| 59 | int current_attribute = 0; | 59 | u32 current_attribute = 0; |
| 60 | } immediate; | 60 | } immediate; |
| 61 | 61 | ||
| 62 | // This is constructed with a dummy triangle topology | 62 | // This is constructed with a dummy triangle topology |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 519d81aeb..0b471dfd2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -93,7 +93,7 @@ RasterizerOpenGL::RasterizerOpenGL() : shader_dirty(true) { | |||
| 93 | state.Apply(); | 93 | state.Apply(); |
| 94 | 94 | ||
| 95 | for (size_t i = 0; i < lighting_luts.size(); ++i) { | 95 | for (size_t i = 0; i < lighting_luts.size(); ++i) { |
| 96 | glActiveTexture(GL_TEXTURE3 + i); | 96 | glActiveTexture(static_cast<GLenum>(GL_TEXTURE3 + i)); |
| 97 | glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA32F, 256, 0, GL_RGBA, GL_FLOAT, nullptr); | 97 | glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA32F, 256, 0, GL_RGBA, GL_FLOAT, nullptr); |
| 98 | glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | 98 | glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 99 | glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | 99 | glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 7fcd36409..8f424a435 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -192,7 +192,7 @@ void RendererOpenGL::LoadFBToScreenInfo(const GPU::Regs::FramebufferConfig& fram | |||
| 192 | // only allows rows to have a memory alignement of 4. | 192 | // only allows rows to have a memory alignement of 4. |
| 193 | ASSERT(pixel_stride % 4 == 0); | 193 | ASSERT(pixel_stride % 4 == 0); |
| 194 | 194 | ||
| 195 | if (!Rasterizer()->AccelerateDisplay(framebuffer, framebuffer_addr, pixel_stride, screen_info)) { | 195 | if (!Rasterizer()->AccelerateDisplay(framebuffer, framebuffer_addr, static_cast<u32>(pixel_stride), screen_info)) { |
| 196 | // Reset the screen info's display texture to its own permanent texture | 196 | // Reset the screen info's display texture to its own permanent texture |
| 197 | screen_info.display_texture = screen_info.texture.resource.handle; | 197 | screen_info.display_texture = screen_info.texture.resource.handle; |
| 198 | screen_info.display_texcoords = MathUtil::Rectangle<float>(0.f, 0.f, 1.f, 1.f); | 198 | screen_info.display_texcoords = MathUtil::Rectangle<float>(0.f, 0.f, 1.f, 1.f); |