radv: do not need to zero-init ds/raster states
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 6 Oct 2017 07:53:20 +0000 (09:53 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 9 Oct 2017 08:06:17 +0000 (10:06 +0200)
Already done when creating the pipeline.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index 670b89c9223a8097bd3a6985d29cc4211ffa49d2..c3458fa037240326c62dfc10079562e28b699780 100644 (file)
@@ -937,7 +937,6 @@ radv_pipeline_init_depth_stencil_state(struct radv_pipeline *pipeline,
        const VkPipelineDepthStencilStateCreateInfo *vkds = pCreateInfo->pDepthStencilState;
        struct radv_depth_stencil_state *ds = &pipeline->graphics.ds;
 
-       memset(ds, 0, sizeof(*ds));
        if (!vkds)
                return;
 
@@ -1004,8 +1003,6 @@ radv_pipeline_init_raster_state(struct radv_pipeline *pipeline,
        const VkPipelineRasterizationStateCreateInfo *vkraster = pCreateInfo->pRasterizationState;
        struct radv_raster_state *raster = &pipeline->graphics.raster;
 
-       memset(raster, 0, sizeof(*raster));
-
        raster->spi_interp_control =
                S_0286D4_FLAT_SHADE_ENA(1) |
                S_0286D4_PNT_SPRITE_ENA(1) |