radv: fix uninitialized variables
This gets rid of "may be used uninitialized" compiler warnings. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
7ca44f8a33
commit
0b539abcf4
@@ -804,7 +804,7 @@ bool radv_format_pack_clear_color(VkFormat format,
|
|||||||
uint32_t clear_vals[2],
|
uint32_t clear_vals[2],
|
||||||
VkClearColorValue *value)
|
VkClearColorValue *value)
|
||||||
{
|
{
|
||||||
uint8_t r, g, b, a;
|
uint8_t r = 0, g = 0, b = 0, a = 0;
|
||||||
const struct vk_format_description *desc = vk_format_description(format);
|
const struct vk_format_description *desc = vk_format_description(format);
|
||||||
|
|
||||||
if (vk_format_get_component_bits(format, VK_FORMAT_COLORSPACE_RGB, 0) <= 8) {
|
if (vk_format_get_component_bits(format, VK_FORMAT_COLORSPACE_RGB, 0) <= 8) {
|
||||||
|
@@ -367,7 +367,7 @@ radv_pipeline_compile(struct radv_pipeline *pipeline,
|
|||||||
struct radv_shader_variant *variant;
|
struct radv_shader_variant *variant;
|
||||||
nir_shader *nir;
|
nir_shader *nir;
|
||||||
void *code = NULL;
|
void *code = NULL;
|
||||||
unsigned code_size;
|
unsigned code_size = 0;
|
||||||
|
|
||||||
if (module->nir)
|
if (module->nir)
|
||||||
_mesa_sha1_compute(module->nir->info.name,
|
_mesa_sha1_compute(module->nir->info.name,
|
||||||
|
Reference in New Issue
Block a user