Path: blob/21.2-virgl/src/microsoft/compiler/dxil_nir.h
4564 views
/*1* Copyright © Microsoft Corporation2*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#ifndef DXIL_NIR_H24#define DXIL_NIR_H2526#include <stdbool.h>27#include "nir.h"28#include "nir_builder.h"2930#ifdef __cplusplus31extern "C" {32#endif3334bool dxil_nir_lower_8bit_conv(nir_shader *shader);35bool dxil_nir_lower_16bit_conv(nir_shader *shader);36bool dxil_nir_lower_x2b(nir_shader *shader);37bool dxil_nir_lower_inot(nir_shader *shader);38bool dxil_nir_lower_ubo_to_temp(nir_shader *shader);39bool dxil_nir_lower_loads_stores_to_dxil(nir_shader *shader);40bool dxil_nir_lower_atomics_to_dxil(nir_shader *shader);41bool dxil_nir_lower_deref_ssbo(nir_shader *shader);42bool dxil_nir_opt_alu_deref_srcs(nir_shader *shader);43bool dxil_nir_lower_memcpy_deref(nir_shader *shader);44bool dxil_nir_lower_upcast_phis(nir_shader *shader, unsigned min_bit_size);45bool dxil_nir_lower_fp16_casts(nir_shader *shader);46bool dxil_nir_split_clip_cull_distance(nir_shader *shader);47bool dxil_nir_lower_double_math(nir_shader *shader);48bool dxil_nir_lower_system_values_to_zero(nir_shader *shader,49gl_system_value* system_value,50uint32_t count);51bool dxil_nir_create_bare_samplers(nir_shader *shader);5253nir_ssa_def *54build_load_ubo_dxil(nir_builder *b, nir_ssa_def *buffer,55nir_ssa_def *offset, unsigned num_components,56unsigned bit_size);5758uint64_t59dxil_sort_by_driver_location(nir_shader* s, nir_variable_mode modes);6061void62dxil_sort_ps_outputs(nir_shader* s);6364uint64_t65dxil_reassign_driver_locations(nir_shader* s, nir_variable_mode modes,66uint64_t other_stage_mask);6768#ifdef __cplusplus69}70#endif7172#endif /* DXIL_NIR_H */737475