Update the entire application to use the new clang format style
This commit is contained in:
@@ -1065,9 +1065,8 @@ bool RasterizerOpenGL::AccelerateTextureCopy(const GPU::Regs::DisplayTransferCon
|
||||
}
|
||||
|
||||
if (output_gap != 0 &&
|
||||
(output_width !=
|
||||
src_surface->BytesInPixels(src_rect.GetWidth() / src_surface->res_scale) *
|
||||
(src_surface->is_tiled ? 8 : 1) ||
|
||||
(output_width != src_surface->BytesInPixels(src_rect.GetWidth() / src_surface->res_scale) *
|
||||
(src_surface->is_tiled ? 8 : 1) ||
|
||||
output_gap % src_surface->BytesInPixels(src_surface->is_tiled ? 64 : 1) != 0)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1075,9 +1074,8 @@ bool RasterizerOpenGL::AccelerateTextureCopy(const GPU::Regs::DisplayTransferCon
|
||||
SurfaceParams dst_params = *src_surface;
|
||||
dst_params.addr = config.GetPhysicalOutputAddress();
|
||||
dst_params.width = src_rect.GetWidth() / src_surface->res_scale;
|
||||
dst_params.stride =
|
||||
dst_params.width +
|
||||
src_surface->PixelsInBytes(src_surface->is_tiled ? output_gap / 8 : output_gap);
|
||||
dst_params.stride = dst_params.width + src_surface->PixelsInBytes(
|
||||
src_surface->is_tiled ? output_gap / 8 : output_gap);
|
||||
dst_params.height = src_rect.GetHeight() / src_surface->res_scale;
|
||||
dst_params.res_scale = src_surface->res_scale;
|
||||
dst_params.UpdateParams();
|
||||
@@ -1396,7 +1394,8 @@ void RasterizerOpenGL::SyncBlendColor() {
|
||||
void RasterizerOpenGL::SyncFogColor() {
|
||||
const auto& regs = Pica::g_state.regs;
|
||||
uniform_block_data.data.fog_color = {
|
||||
regs.texturing.fog_color.r.Value() / 255.0f, regs.texturing.fog_color.g.Value() / 255.0f,
|
||||
regs.texturing.fog_color.r.Value() / 255.0f,
|
||||
regs.texturing.fog_color.g.Value() / 255.0f,
|
||||
regs.texturing.fog_color.b.Value() / 255.0f,
|
||||
};
|
||||
uniform_block_data.dirty = true;
|
||||
@@ -1424,7 +1423,8 @@ void RasterizerOpenGL::SyncProcTexNoise() {
|
||||
Pica::float16::FromRaw(regs.proctex_noise_frequency.v).ToFloat32(),
|
||||
};
|
||||
uniform_block_data.data.proctex_noise_a = {
|
||||
regs.proctex_noise_u.amplitude / 4095.0f, regs.proctex_noise_v.amplitude / 4095.0f,
|
||||
regs.proctex_noise_u.amplitude / 4095.0f,
|
||||
regs.proctex_noise_v.amplitude / 4095.0f,
|
||||
};
|
||||
uniform_block_data.data.proctex_noise_p = {
|
||||
Pica::float16::FromRaw(regs.proctex_noise_u.phase).ToFloat32(),
|
||||
|
@@ -662,7 +662,6 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) {
|
||||
// LUT index is in the range of (-1.0, 1.0)
|
||||
return "LookupLightingLUTSigned(" + sampler_string + ", " + index + ")";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Write the code to emulate each enabled light
|
||||
|
@@ -16,4 +16,4 @@ namespace GLShader {
|
||||
*/
|
||||
GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader);
|
||||
|
||||
} // namespace
|
||||
} // namespace GLShader
|
||||
|
@@ -221,15 +221,19 @@ inline GLenum StencilOp(Pica::FramebufferRegs::StencilAction action) {
|
||||
|
||||
inline GLvec4 ColorRGBA8(const u32 color) {
|
||||
return {{
|
||||
(color >> 0 & 0xFF) / 255.0f, (color >> 8 & 0xFF) / 255.0f, (color >> 16 & 0xFF) / 255.0f,
|
||||
(color >> 0 & 0xFF) / 255.0f,
|
||||
(color >> 8 & 0xFF) / 255.0f,
|
||||
(color >> 16 & 0xFF) / 255.0f,
|
||||
(color >> 24 & 0xFF) / 255.0f,
|
||||
}};
|
||||
}
|
||||
|
||||
inline std::array<GLfloat, 3> LightColor(const Pica::LightingRegs::LightColor& color) {
|
||||
return {{
|
||||
color.r / 255.0f, color.g / 255.0f, color.b / 255.0f,
|
||||
color.r / 255.0f,
|
||||
color.g / 255.0f,
|
||||
color.b / 255.0f,
|
||||
}};
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace PicaToGL
|
||||
|
Reference in New Issue
Block a user