Path: blob/21.2-virgl/src/amd/vulkan/radv_shader_args.h
7233 views
/*1* Copyright © 2019 Valve Corporation.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21*/2223#include "compiler/shader_enums.h"24#include "util/list.h"25#include "util/macros.h"26#include "ac_shader_args.h"27#include "amd_family.h"28#include "radv_constants.h"2930struct radv_shader_args {31struct ac_shader_args ac;32struct radv_shader_info *shader_info;33const struct radv_nir_compiler_options *options;3435struct ac_arg descriptor_sets[MAX_SETS];36struct ac_arg ring_offsets;3738/* Streamout */39struct ac_arg streamout_buffers;4041/* NGG GS */42struct ac_arg ngg_gs_state;43struct ac_arg ngg_culling_settings;44struct ac_arg ngg_viewport_scale[2];45struct ac_arg ngg_viewport_translate[2];4647bool is_gs_copy_shader;48bool is_trap_handler_shader;49};5051static inline struct radv_shader_args *52radv_shader_args_from_ac(struct ac_shader_args *args)53{54return container_of(args, struct radv_shader_args, ac);55}5657void radv_declare_shader_args(struct radv_shader_args *args, gl_shader_stage stage,58bool has_previous_stage, gl_shader_stage previous_stage);596061