v3dv: Fix uninitialized variable warnings

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8570>
This commit is contained in:
Arcady Goldmints-Orlov 2021-01-18 18:16:12 -06:00
parent cec2ed7c80
commit c57ef25342
3 changed files with 6 additions and 6 deletions

View File

@ -4987,6 +4987,7 @@ blit_shader(struct v3dv_cmd_buffer *cmd_buffer,
{
bool handled = true;
VkResult result;
uint32_t dirty_dynamic_state = 0;
/* We don't support rendering to linear depth/stencil, this should have
* been rewritten to a compatible color blit by the caller.
@ -5087,7 +5088,7 @@ blit_shader(struct v3dv_cmd_buffer *cmd_buffer,
uint32_t min_dst_layer;
uint32_t max_dst_layer;
bool dst_mirror_z;
bool dst_mirror_z = false;
if (dst->type != VK_IMAGE_TYPE_3D) {
min_dst_layer = region.dstSubresource.baseArrayLayer;
max_dst_layer = min_dst_layer + region.dstSubresource.layerCount;
@ -5099,7 +5100,7 @@ blit_shader(struct v3dv_cmd_buffer *cmd_buffer,
uint32_t min_src_layer;
uint32_t max_src_layer;
bool src_mirror_z;
bool src_mirror_z = false;
if (src->type != VK_IMAGE_TYPE_3D) {
min_src_layer = region.srcSubresource.baseArrayLayer;
max_src_layer = min_src_layer + region.srcSubresource.layerCount;
@ -5212,14 +5213,13 @@ blit_shader(struct v3dv_cmd_buffer *cmd_buffer,
};
v3dv_CmdSetScissor(_cmd_buffer, 0, 1, &scissor);
bool can_skip_tlb_load;
bool can_skip_tlb_load = false;
const VkRect2D render_area = {
.offset = { dst_x, dst_y },
.extent = { dst_w, dst_h },
};
/* Record per-layer commands */
uint32_t dirty_dynamic_state = 0;
VkImageAspectFlags aspects = region.dstSubresource.aspectMask;
for (uint32_t i = 0; i < layer_count; i++) {
/* Setup framebuffer */

View File

@ -747,7 +747,7 @@ lower_sampler(nir_builder *b, nir_tex_instr *instr,
struct v3dv_pipeline *pipeline,
const struct v3dv_pipeline_layout *layout)
{
uint8_t return_size;
uint8_t return_size = 0;
int texture_idx =
nir_tex_instr_src_index(instr, nir_tex_src_texture_deref);

View File

@ -228,7 +228,7 @@ v3dv_get_query_pool_results_cpu(struct v3dv_device *device,
VkResult result = VK_SUCCESS;
for (uint32_t i = first; i < first + count; i++) {
bool available;
bool available = false;
uint64_t value = get_query_result(device, pool, i, do_wait, &available);
/**