rsx: Initialize some uninitialized members

This commit is contained in:
Megamouse 2024-05-16 01:38:50 +02:00
parent dfee5b9a6c
commit 2637dc35a7
3 changed files with 7 additions and 8 deletions

View file

@ -19,7 +19,6 @@ struct frame_trace_data
std::array<std::vector<std::byte>, 2> depth_stencil; std::array<std::vector<std::byte>, 2> depth_stencil;
std::vector<std::byte> index; std::vector<std::byte> index;
u32 vertex_count; u32 vertex_count;
}; };
std::vector<std::pair<u32, u32>> command_queue; std::vector<std::pair<u32, u32>> command_queue;

View file

@ -741,7 +741,7 @@ namespace rsx
ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state, scan_mode); ar(stereo_mode, format, aspect, resolution_id, scanline_pitch, gamma, resolution_x, resolution_y, state, scan_mode);
} }
void thread::capture_frame(const std::string &name) void thread::capture_frame(const std::string& name)
{ {
frame_trace_data::draw_state draw_state{}; frame_trace_data::draw_state draw_state{};
@ -2485,7 +2485,7 @@ namespace rsx
if (tex.enabled() && sampler_descriptors[i]->format_class != RSX_FORMAT_CLASS_UNDEFINED) if (tex.enabled() && sampler_descriptors[i]->format_class != RSX_FORMAT_CLASS_UNDEFINED)
{ {
std::memcpy(current_fragment_program.texture_params[i].scale, sampler_descriptors[i]->texcoord_xform.scale, 6 * sizeof(float)); std::memcpy(current_fragment_program.texture_params[i].scale, sampler_descriptors[i]->texcoord_xform.scale, 6 * sizeof(f32));
current_fragment_program.texture_params[i].remap = tex.remap(); current_fragment_program.texture_params[i].remap = tex.remap();
m_graphics_state |= rsx::pipeline_state::fragment_texture_state_dirty; m_graphics_state |= rsx::pipeline_state::fragment_texture_state_dirty;
@ -2495,7 +2495,7 @@ namespace rsx
if (sampler_descriptors[i]->texcoord_xform.clamp) if (sampler_descriptors[i]->texcoord_xform.clamp)
{ {
std::memcpy(current_fragment_program.texture_params[i].clamp_min, sampler_descriptors[i]->texcoord_xform.clamp_min, 4 * sizeof(float)); std::memcpy(current_fragment_program.texture_params[i].clamp_min, sampler_descriptors[i]->texcoord_xform.clamp_min, 4 * sizeof(f32));
texture_control |= (1 << rsx::texture_control_bits::CLAMP_TEXCOORDS_BIT); texture_control |= (1 << rsx::texture_control_bits::CLAMP_TEXCOORDS_BIT);
} }

View file

@ -203,7 +203,7 @@ namespace rsx
// Profiler // Profiler
rsx::profiling_timer m_profiler; rsx::profiling_timer m_profiler;
frame_statistics_t m_frame_stats; frame_statistics_t m_frame_stats{};
// Savestates related // Savestates related
u32 m_pause_after_x_flips = 0; u32 m_pause_after_x_flips = 0;
@ -262,7 +262,7 @@ namespace rsx
atomic_bitmask_t<flip_request> async_flip_requested{}; atomic_bitmask_t<flip_request> async_flip_requested{};
u8 async_flip_buffer{ 0 }; u8 async_flip_buffer{ 0 };
void capture_frame(const std::string &name); void capture_frame(const std::string& name);
const backend_configuration& get_backend_config() const { return backend_config; } const backend_configuration& get_backend_config() const { return backend_config; }
public: public:
@ -272,8 +272,8 @@ namespace rsx
bool isHLE{ false }; bool isHLE{ false };
bool serialized = false; bool serialized = false;
u32 flip_status; u32 flip_status = CELL_GCM_DISPLAY_FLIP_STATUS_DONE;
int debug_level; int debug_level = CELL_GCM_DEBUG_LEVEL0;
atomic_t<bool> requested_vsync{true}; atomic_t<bool> requested_vsync{true};
atomic_t<bool> enable_second_vhandler{false}; atomic_t<bool> enable_second_vhandler{false};