Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/gallium/drivers/d3d12/d3d12_nir_passes.h
4570 views
1
/*
2
* Copyright © Microsoft Corporation
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
* copy of this software and associated documentation files (the "Software"),
6
* to deal in the Software without restriction, including without limitation
7
* on the rights to use, copy, modify, merge, publish, distribute, sub
8
* license, and/or sell copies of the Software, and to permit persons to whom
9
* the Software is furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice (including the next
12
* paragraph) shall be included in all copies or substantial portions of the
13
* Software.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21
* USE OR OTHER DEALINGS IN THE SOFTWARE.
22
*/
23
24
#ifndef D3D12_NIR_PASSES_H
25
#define D3D12_NIR_PASSES_H
26
27
#include "nir.h"
28
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32
33
struct d3d12_shader;
34
35
bool
36
d3d12_lower_point_sprite(nir_shader *shader,
37
bool sprite_origin_lower_left,
38
bool point_size_per_vertex,
39
unsigned point_coord_enable,
40
uint64_t next_inputs_read);
41
42
bool
43
d3d12_lower_state_vars(struct nir_shader *s, struct d3d12_shader *shader);
44
45
void
46
d3d12_lower_yflip(nir_shader *s);
47
48
void
49
d3d12_forward_front_face(nir_shader *nir);
50
51
void
52
d3d12_lower_depth_range(nir_shader *nir);
53
54
bool
55
d3d12_lower_load_first_vertex(nir_shader *nir);
56
57
bool
58
d3d12_lower_bool_input(struct nir_shader *s);
59
60
void
61
d3d12_lower_uint_cast(nir_shader *nir, bool is_signed);
62
63
void
64
d3d12_add_missing_dual_src_target(struct nir_shader *s,
65
unsigned missing_mask);
66
67
bool
68
d3d12_fix_io_uint_type(struct nir_shader *s, uint64_t in_mask, uint64_t out_mask);
69
70
void
71
d3d12_nir_invert_depth(nir_shader *s);
72
73
bool
74
d3d12_lower_int_cubmap_to_array(nir_shader *s);
75
76
bool
77
nir_lower_packed_ubo_loads(struct nir_shader *nir);
78
79
bool
80
d3d12_nir_lower_vs_vertex_conversion(nir_shader *s, enum pipe_format target_formats[]);
81
82
void
83
d3d12_lower_primitive_id(nir_shader *shader);
84
85
void
86
d3d12_lower_triangle_strip(nir_shader *shader);
87
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif // D3D12_NIR_PASSES_H
93
94