diff options
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -2150,7 +2150,7 @@ void Pipeline_Vk::init_stages( &scope, sizeof *sis * count ); - memset(sis, 0, sizeof *sis * count); + zero(sis, sizeof *sis * count); for (i = 0, count = 0; i < shader_type_count; i++) { if (shader.modules[i]) { auto& si = sis[i]; @@ -2178,7 +2178,7 @@ void Pipeline_Vk::init_vertex_input( &scope, sizeof vi ); - memset(&vi, 0, sizeof vi); + zero(&vi, sizeof vi); vi.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; vi.vertexBindingDescriptionCount = vf.binding_count; vi.pVertexBindingDescriptions = vf.bindings; @@ -2201,7 +2201,7 @@ void Pipeline_Vk::init_input_assembly( (void)dev; (void)desc; (void)info; - memset(&ia, 0, sizeof ia); + zero(&ia, sizeof ia); ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; info.pInputAssemblyState = &ia; @@ -2226,9 +2226,9 @@ void Pipeline_Vk::init_viewport( &scope, sizeof viewport ); - memset(&vi, 0, sizeof vi); - memset(&scissor, 0, sizeof scissor); - memset(&viewport, 0, sizeof viewport); + zero(&vi, sizeof vi); + zero(&scissor, sizeof scissor); + zero(&viewport, sizeof viewport); scissor.offset.x = desc.scissor[0]; scissor.offset.y = desc.scissor[1]; scissor.extent.width = desc.scissor[2]; @@ -2260,7 +2260,7 @@ void Pipeline_Vk::init_rasterisation( ); (void)dev; (void)desc; - memset(&ri, 0, sizeof ri); + zero(&ri, sizeof ri); ri.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; ri.depthClampEnable = VK_FALSE; ri.rasterizerDiscardEnable = VK_FALSE; @@ -2285,7 +2285,7 @@ void Pipeline_Vk::init_msaa( ); (void)dev; (void)desc; - memset(&mi, 0, sizeof mi); + zero(&mi, sizeof mi); mi.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; mi.sampleShadingEnable = VK_FALSE; mi.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; @@ -2305,7 +2305,7 @@ void Pipeline_Vk::init_depthstencil( ); (void)dev; (void)desc; - memset(&ds, 0, sizeof ds); + zero(&ds, sizeof ds); ds.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; ds.depthTestEnable = VK_FALSE; ds.depthWriteEnable = VK_FALSE; @@ -2333,8 +2333,8 @@ void Pipeline_Vk::init_blending( ); (void)dev; (void)desc; - memset(&bi, 0, sizeof bi); - memset(&abs, 0, sizeof abs); + zero(&bi, sizeof bi); + zero(&abs, sizeof abs); abs.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | @@ -2365,7 +2365,7 @@ void Pipeline_Vk::init_descriptors( count * sizeof *descs ); VkDescriptorSetLayoutCreateInfo di{}; - memset(descs, 0, count * sizeof *descs); + zero(descs, count * sizeof *descs); for (i = 0; i < count; i++) { int j, stage; auto& dst = descs[i]; @@ -2612,8 +2612,8 @@ void Vertex_Format_Vk::init( dev->heap, attr_count * sizeof *attrs ); - memset(bindings, 0, binding_count * sizeof *bindings); - memset(attrs, 0, attr_count * sizeof *attrs); + zero(bindings, binding_count * sizeof *bindings); + zero(attrs, attr_count * sizeof *attrs); for (i = 0; i < binding_count; i++) { auto& dst = bindings[i]; const auto& src = desc.bindings[i]; |