glsl: Initialize parcel_out_uniform_storage members.

Fix defects reported by Coverity Scan.

uninit_member: Non-static class member buffer_block_index is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member ubo_byte_offset is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_type is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_bindless_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_bindless_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_subroutine is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member field_counter is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member current_var is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member explicit_location is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_array_count is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_bindless_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_bindless_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member targets is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_samplers_used is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_shadow_samplers is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member num_bindless_samplers is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member num_bindless_images is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7910>
This commit is contained in:
Vinson Lee
2020-12-03 15:52:34 -08:00
parent 598dc3dca4
commit cd222e4a9c

View File

@@ -685,11 +685,24 @@ public:
struct gl_uniform_storage *uniforms, struct gl_uniform_storage *uniforms,
union gl_constant_value *values, union gl_constant_value *values,
bool use_std430_as_default) bool use_std430_as_default)
: prog(prog), map(map), uniforms(uniforms), : buffer_block_index(0), ubo_byte_offset(0),
use_std430_as_default(use_std430_as_default), values(values), shader_type(MESA_SHADER_NONE),
bindless_targets(NULL), bindless_access(NULL), prog(prog), map(map), uniforms(uniforms),
next_sampler(0), next_bindless_sampler(0), next_image(0),
next_bindless_image(0), next_subroutine(0),
use_std430_as_default(use_std430_as_default),
field_counter(0), current_var(NULL), explicit_location(0),
record_array_count(0), record_next_sampler(NULL),
record_next_image(NULL), record_next_bindless_sampler(NULL),
record_next_bindless_image(NULL),
values(values),
shader_samplers_used(0), shader_shadow_samplers(0),
num_bindless_samplers(0),
bindless_targets(NULL), num_bindless_images(0),
bindless_access(NULL),
shader_storage_blocks_write_access(0) shader_storage_blocks_write_access(0)
{ {
memset(this->targets, 0, sizeof(this->targets));
} }
virtual ~parcel_out_uniform_storage() virtual ~parcel_out_uniform_storage()