mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 23:50:22 +01:00
radv: do not need to double zero-init the meta state structures
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
af62984c8a
commit
457306fa4c
12 changed files with 0 additions and 28 deletions
|
|
@ -1210,7 +1210,6 @@ radv_device_init_meta_blit_state(struct radv_device *device)
|
|||
{
|
||||
VkResult result;
|
||||
struct radv_shader_module vs = {0};
|
||||
zero(device->meta_state.blit);
|
||||
|
||||
VkDescriptorSetLayoutCreateInfo ds_layout_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
|
||||
|
|
|
|||
|
|
@ -1136,8 +1136,6 @@ radv_device_init_meta_blit2d_state(struct radv_device *device)
|
|||
{
|
||||
VkResult result;
|
||||
|
||||
zero(device->meta_state.blit2d);
|
||||
|
||||
const VkPushConstantRange push_constant_ranges[] = {
|
||||
{VK_SHADER_STAGE_VERTEX_BIT, 0, 16},
|
||||
{VK_SHADER_STAGE_FRAGMENT_BIT, 16, 4},
|
||||
|
|
|
|||
|
|
@ -121,8 +121,6 @@ VkResult radv_device_init_meta_buffer_state(struct radv_device *device)
|
|||
struct radv_shader_module fill_cs = { .nir = NULL };
|
||||
struct radv_shader_module copy_cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.buffer);
|
||||
|
||||
fill_cs.nir = build_buffer_fill_shader(device);
|
||||
copy_cs.nir = build_buffer_copy_shader(device);
|
||||
|
||||
|
|
|
|||
|
|
@ -127,8 +127,6 @@ radv_device_init_meta_itob_state(struct radv_device *device)
|
|||
VkResult result;
|
||||
struct radv_shader_module cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.itob);
|
||||
|
||||
cs.nir = build_nir_itob_compute_shader(device);
|
||||
|
||||
/*
|
||||
|
|
@ -327,8 +325,6 @@ radv_device_init_meta_btoi_state(struct radv_device *device)
|
|||
VkResult result;
|
||||
struct radv_shader_module cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.btoi);
|
||||
|
||||
cs.nir = build_nir_btoi_compute_shader(device);
|
||||
|
||||
/*
|
||||
|
|
@ -521,8 +517,6 @@ radv_device_init_meta_itoi_state(struct radv_device *device)
|
|||
VkResult result;
|
||||
struct radv_shader_module cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.itoi);
|
||||
|
||||
cs.nir = build_nir_itoi_compute_shader(device);
|
||||
|
||||
/*
|
||||
|
|
@ -677,8 +671,6 @@ radv_device_init_meta_cleari_state(struct radv_device *device)
|
|||
VkResult result;
|
||||
struct radv_shader_module cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.cleari);
|
||||
|
||||
cs.nir = build_nir_cleari_compute_shader(device);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -768,8 +768,6 @@ radv_device_init_meta_clear_state(struct radv_device *device)
|
|||
VkResult res;
|
||||
struct radv_meta_state *state = &device->meta_state;
|
||||
|
||||
memset(&device->meta_state.clear, 0, sizeof(device->meta_state.clear));
|
||||
|
||||
VkPipelineLayoutCreateInfo pl_color_create_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
|
||||
.setLayoutCount = 0,
|
||||
|
|
|
|||
|
|
@ -232,8 +232,6 @@ radv_device_init_meta_depth_decomp_state(struct radv_device *device)
|
|||
struct radv_meta_state *state = &device->meta_state;
|
||||
VkResult res = VK_SUCCESS;
|
||||
|
||||
zero(state->depth_decomp);
|
||||
|
||||
struct radv_shader_module vs_module = { .nir = radv_meta_build_nir_vs_generate_vertices() };
|
||||
if (!vs_module.nir) {
|
||||
/* XXX: Need more accurate error */
|
||||
|
|
|
|||
|
|
@ -266,8 +266,6 @@ radv_device_init_meta_fast_clear_flush_state(struct radv_device *device)
|
|||
{
|
||||
VkResult res = VK_SUCCESS;
|
||||
|
||||
zero(device->meta_state.fast_clear_flush);
|
||||
|
||||
struct radv_shader_module vs_module = { .nir = radv_meta_build_nir_vs_generate_vertices() };
|
||||
if (!vs_module.nir) {
|
||||
/* XXX: Need more accurate error */
|
||||
|
|
|
|||
|
|
@ -238,8 +238,6 @@ radv_device_init_meta_resolve_state(struct radv_device *device)
|
|||
{
|
||||
VkResult res = VK_SUCCESS;
|
||||
|
||||
zero(device->meta_state.resolve);
|
||||
|
||||
struct radv_shader_module vs_module = { .nir = radv_meta_build_nir_vs_generate_vertices() };
|
||||
if (!vs_module.nir) {
|
||||
/* XXX: Need more accurate error */
|
||||
|
|
|
|||
|
|
@ -250,7 +250,6 @@ radv_device_init_meta_resolve_compute_state(struct radv_device *device)
|
|||
{
|
||||
struct radv_meta_state *state = &device->meta_state;
|
||||
VkResult res;
|
||||
memset(&device->meta_state.resolve_compute, 0, sizeof(device->meta_state.resolve_compute));
|
||||
|
||||
res = create_layout(device);
|
||||
if (res != VK_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -332,9 +332,7 @@ fail:
|
|||
VkResult
|
||||
radv_device_init_meta_resolve_fragment_state(struct radv_device *device)
|
||||
{
|
||||
struct radv_meta_state *state = &device->meta_state;
|
||||
VkResult res;
|
||||
memset(&state->resolve_fragment, 0, sizeof(state->resolve_fragment));
|
||||
|
||||
res = create_layout(device);
|
||||
if (res != VK_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -197,8 +197,6 @@ radv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
|
|||
memcpy((dest), (src), (count) * sizeof(*(src))); \
|
||||
})
|
||||
|
||||
#define zero(x) (memset(&(x), 0, sizeof(x)))
|
||||
|
||||
/* Whenever we generate an error, pass it through this function. Useful for
|
||||
* debugging, where we can break on it. Only call at error site, not when
|
||||
* propagating errors. Might be useful to plug in a stack trace here.
|
||||
|
|
|
|||
|
|
@ -519,8 +519,6 @@ VkResult radv_device_init_meta_query_state(struct radv_device *device)
|
|||
struct radv_shader_module occlusion_cs = { .nir = NULL };
|
||||
struct radv_shader_module pipeline_statistics_cs = { .nir = NULL };
|
||||
|
||||
zero(device->meta_state.query);
|
||||
|
||||
occlusion_cs.nir = build_occlusion_query_shader(device);
|
||||
pipeline_statistics_cs.nir = build_pipeline_statistics_query_shader(device);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue