GPU: Fix valgrind warnings about branching on uninitialized variables

This commit is contained in:
Clément Foucault 2020-11-05 17:59:07 +01:00
parent aae60f0fec
commit c3e832144b
2 changed files with 4 additions and 4 deletions

View File

@ -100,10 +100,10 @@ class FrameBuffer {
/** Debug name. */
char name_[DEBUG_NAME_LEN];
/** Frame-buffer state. */
int viewport_[4];
int scissor_[4];
int viewport_[4] = {0};
int scissor_[4] = {0};
bool scissor_test_ = false;
bool dirty_state_;
bool dirty_state_ = true;
public:
FrameBuffer(const char *name);

View File

@ -47,7 +47,7 @@ class Immediate {
/** Current draw call specification. */
GPUPrimType prim_type = GPU_PRIM_NONE;
GPUVertFormat vertex_format;
GPUVertFormat vertex_format = {};
GPUShader *shader = NULL;
/** Enforce strict vertex count (disabled when using immBeginAtMost). */
bool strict_vertex_len = true;