radv: Prevent Coverity warning
authorRobert Foss <robert.foss@collabora.com>
Mon, 30 Jan 2017 21:26:58 +0000 (16:26 -0500)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 30 Jan 2017 22:59:22 +0000 (23:59 +0100)
Prevent Coverity seeing potential errors when src is
no initialized in the switch case.

Coverity-Id: 1396397
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 8c0bf8f3722dc4b2e42444ba32b4e0896e5439c0..afa84528874f6c231e44dd8231b62cfc9f375d07 100644 (file)
@@ -415,6 +415,8 @@ radv_update_multisample_state(struct radv_cmd_buffer *cmd_buffer,
        case 16:
                src = cmd_buffer->device->sample_locations_16x;
                break;
+       default:
+               unreachable("unknown number of samples");
        }
        memcpy(samples_ptr, src, num_samples * 4 * 2);