~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/microsoft/compiler/dxil_enums.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
   unreachable("unexpected glsl type");
123
123
}
124
124
 
125
 
enum dxil_input_primitive dxil_get_input_primitive(enum shader_prim primitive)
 
125
enum dxil_input_primitive dxil_get_input_primitive(unsigned primitive)
126
126
{
127
127
   switch (primitive) {
128
 
   case SHADER_PRIM_POINTS:
 
128
   case MESA_PRIM_POINTS:
129
129
      return DXIL_INPUT_PRIMITIVE_POINT;
130
 
   case SHADER_PRIM_LINES:
 
130
   case MESA_PRIM_LINES:
131
131
      return DXIL_INPUT_PRIMITIVE_LINE;
132
 
   case SHADER_PRIM_LINES_ADJACENCY:
 
132
   case MESA_PRIM_LINES_ADJACENCY:
133
133
      return DXIL_INPUT_PRIMITIVE_LINES_ADJENCY;
134
 
   case SHADER_PRIM_TRIANGLES:
 
134
   case MESA_PRIM_TRIANGLES:
135
135
      return DXIL_INPUT_PRIMITIVE_TRIANGLE;
136
 
   case SHADER_PRIM_TRIANGLES_ADJACENCY:
 
136
   case MESA_PRIM_TRIANGLES_ADJACENCY:
137
137
      return DXIL_INPUT_PRIMITIVE_TRIANGLES_ADJENCY;
138
138
   default:
139
139
      unreachable("unhandled primitive topology");
140
140
   }
141
141
}
142
142
 
143
 
enum dxil_primitive_topology dxil_get_primitive_topology(enum shader_prim topology)
 
143
enum dxil_primitive_topology dxil_get_primitive_topology(unsigned topology)
144
144
{
145
145
   switch (topology) {
146
 
   case SHADER_PRIM_POINTS:
 
146
   case MESA_PRIM_POINTS:
147
147
      return DXIL_PRIMITIVE_TOPOLOGY_POINT_LIST;
148
 
   case SHADER_PRIM_LINES:
 
148
   case MESA_PRIM_LINES:
149
149
      return DXIL_PRIMITIVE_TOPOLOGY_LINE_LIST;
150
 
   case SHADER_PRIM_LINE_STRIP:
 
150
   case MESA_PRIM_LINE_STRIP:
151
151
      return DXIL_PRIMITIVE_TOPOLOGY_LINE_STRIP;
152
 
   case SHADER_PRIM_TRIANGLE_STRIP:
 
152
   case MESA_PRIM_TRIANGLE_STRIP:
153
153
      return DXIL_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
154
154
   default:
155
155
      unreachable("unhandled primitive topology");