mesa/*: add a shader primitive type to get away from GL types.
This creates an internal shader_prim enum, I've fixed up most users to use it instead of GL types. don't store the enum in shader_info as it changes size, and confuses other things. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
This commit is contained in:
parent
d54c07b4c4
commit
1352e0ba0c
|
@ -1891,11 +1891,11 @@ ac_nir_lower_ngg_gs(nir_shader *shader,
|
|||
if (!state.output_compile_time_known)
|
||||
state.current_clear_primflag_idx_var = nir_local_variable_create(impl, glsl_uint_type(), "current_clear_primflag_idx");
|
||||
|
||||
if (shader->info.gs.output_primitive == GL_POINTS)
|
||||
if (shader->info.gs.output_primitive == SHADER_PRIM_POINTS)
|
||||
state.num_vertices_per_primitive = 1;
|
||||
else if (shader->info.gs.output_primitive == GL_LINE_STRIP)
|
||||
else if (shader->info.gs.output_primitive == SHADER_PRIM_LINE_STRIP)
|
||||
state.num_vertices_per_primitive = 2;
|
||||
else if (shader->info.gs.output_primitive == GL_TRIANGLE_STRIP)
|
||||
else if (shader->info.gs.output_primitive == SHADER_PRIM_TRIANGLE_STRIP)
|
||||
state.num_vertices_per_primitive = 3;
|
||||
else
|
||||
unreachable("Invalid GS output primitive.");
|
||||
|
@ -2416,9 +2416,9 @@ ac_nir_lower_ngg_ms(nir_shader *shader,
|
|||
assert(impl);
|
||||
|
||||
unsigned vertices_per_prim = 3;
|
||||
if (shader->info.mesh.primitive_type == GL_POINTS)
|
||||
if (shader->info.mesh.primitive_type == SHADER_PRIM_POINTS)
|
||||
vertices_per_prim = 1;
|
||||
else if (shader->info.mesh.primitive_type == GL_LINES)
|
||||
else if (shader->info.mesh.primitive_type == SHADER_PRIM_LINES)
|
||||
vertices_per_prim = 2;
|
||||
|
||||
uint64_t per_vertex_outputs = shader->info.outputs_written & ~shader->info.per_primitive_outputs
|
||||
|
|
|
@ -1302,18 +1302,17 @@ static uint32_t
|
|||
si_conv_gl_prim_to_gs_out(unsigned gl_prim)
|
||||
{
|
||||
switch (gl_prim) {
|
||||
case 0: /* GL_POINTS */
|
||||
case SHADER_PRIM_POINTS:
|
||||
return V_028A6C_POINTLIST;
|
||||
case 1: /* GL_LINES */
|
||||
case 3: /* GL_LINE_STRIP */
|
||||
case 0xA: /* GL_LINES_ADJACENCY */
|
||||
case 0x8E7A: /* GL_ISOLINES */
|
||||
case SHADER_PRIM_LINES:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
return V_028A6C_LINESTRIP;
|
||||
|
||||
case 4: /* GL_TRIANGLES */
|
||||
case 0xc: /* GL_TRIANGLES_ADJACENCY_ARB */
|
||||
case 5: /* GL_TRIANGLE_STRIP */
|
||||
case 7: /* GL_QUADS */
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_QUADS:
|
||||
return V_028A6C_TRISTRIP;
|
||||
default:
|
||||
assert(0);
|
||||
|
@ -2603,8 +2602,8 @@ radv_link_shaders(struct radv_pipeline *pipeline,
|
|||
info->stage == pipeline->graphics.last_vgt_api_stage &&
|
||||
((info->stage == MESA_SHADER_VERTEX && pipeline_key->vs.topology == VK_PRIMITIVE_TOPOLOGY_POINT_LIST) ||
|
||||
(info->stage == MESA_SHADER_TESS_EVAL && info->tess.point_mode) ||
|
||||
(info->stage == MESA_SHADER_GEOMETRY && info->gs.output_primitive == GL_POINTS) ||
|
||||
(info->stage == MESA_SHADER_MESH && info->mesh.primitive_type == GL_POINTS));
|
||||
(info->stage == MESA_SHADER_GEOMETRY && info->gs.output_primitive == SHADER_PRIM_POINTS) ||
|
||||
(info->stage == MESA_SHADER_MESH && info->mesh.primitive_type == SHADER_PRIM_POINTS));
|
||||
|
||||
nir_variable *psiz_var =
|
||||
nir_find_variable_with_location(ordered_shaders[i], nir_var_shader_out, VARYING_SLOT_PSIZ);
|
||||
|
|
|
@ -2670,22 +2670,22 @@ void radv_describe_layout_transition(struct radv_cmd_buffer *cmd_buffer,
|
|||
uint64_t radv_get_current_time(void);
|
||||
|
||||
static inline uint32_t
|
||||
si_conv_gl_prim_to_vertices(unsigned gl_prim)
|
||||
si_conv_gl_prim_to_vertices(enum shader_prim gl_prim)
|
||||
{
|
||||
switch (gl_prim) {
|
||||
case 0: /* GL_POINTS */
|
||||
case SHADER_PRIM_POINTS:
|
||||
return 1;
|
||||
case 1: /* GL_LINES */
|
||||
case 3: /* GL_LINE_STRIP */
|
||||
case SHADER_PRIM_LINES:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return 2;
|
||||
case 4: /* GL_TRIANGLES */
|
||||
case 5: /* GL_TRIANGLE_STRIP */
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return 3;
|
||||
case 0xA: /* GL_LINES_ADJACENCY */
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
return 4;
|
||||
case 0xc: /* GL_TRIANGLES_ADJACENCY */
|
||||
case SHADER_PRIM_TRIANGLES_ADJACENCY:
|
||||
return 6;
|
||||
case 7: /* GL_QUADS */
|
||||
case SHADER_PRIM_QUADS:
|
||||
return V_028A6C_TRISTRIP;
|
||||
default:
|
||||
assert(0);
|
||||
|
|
|
@ -1039,12 +1039,12 @@ void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir,
|
|||
} else if (nir->info.stage == MESA_SHADER_GEOMETRY) {
|
||||
num_vertices_per_prim = nir->info.gs.vertices_in;
|
||||
} else if (nir->info.stage == MESA_SHADER_MESH) {
|
||||
if (nir->info.mesh.primitive_type == GL_POINTS)
|
||||
if (nir->info.mesh.primitive_type == SHADER_PRIM_POINTS)
|
||||
num_vertices_per_prim = 1;
|
||||
else if (nir->info.mesh.primitive_type == GL_LINES)
|
||||
else if (nir->info.mesh.primitive_type == SHADER_PRIM_LINES)
|
||||
num_vertices_per_prim = 2;
|
||||
else
|
||||
assert(nir->info.mesh.primitive_type == GL_TRIANGLES);
|
||||
assert(nir->info.mesh.primitive_type == SHADER_PRIM_TRIANGLES);
|
||||
} else {
|
||||
unreachable("NGG needs to be VS, TES or GS.");
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ struct radv_shader_info {
|
|||
} tcs;
|
||||
struct {
|
||||
struct radv_vs_output_info outinfo;
|
||||
uint16_t output_prim; /* Output primitive type: GL_POINTS, GL_LINES or GL_TRIANGLES. */
|
||||
enum shader_prim output_prim;
|
||||
} ms;
|
||||
|
||||
struct radv_streamout_info so;
|
||||
|
|
|
@ -371,8 +371,8 @@ get_clear_rect_gs(uint32_t push_constant_layer_base)
|
|||
nir->info.inputs_read = 1ull << VARYING_SLOT_POS;
|
||||
nir->info.outputs_written = (1ull << VARYING_SLOT_POS) |
|
||||
(1ull << VARYING_SLOT_LAYER);
|
||||
nir->info.gs.input_primitive = GL_TRIANGLES;
|
||||
nir->info.gs.output_primitive = GL_TRIANGLE_STRIP;
|
||||
nir->info.gs.input_primitive = SHADER_PRIM_TRIANGLES;
|
||||
nir->info.gs.output_primitive = SHADER_PRIM_TRIANGLE_STRIP;
|
||||
nir->info.gs.vertices_in = 3;
|
||||
nir->info.gs.vertices_out = 3;
|
||||
nir->info.gs.invocations = 1;
|
||||
|
|
|
@ -1620,8 +1620,8 @@ get_texel_buffer_copy_gs()
|
|||
nir->info.inputs_read = 1ull << VARYING_SLOT_POS;
|
||||
nir->info.outputs_written = (1ull << VARYING_SLOT_POS) |
|
||||
(1ull << VARYING_SLOT_LAYER);
|
||||
nir->info.gs.input_primitive = GL_TRIANGLES;
|
||||
nir->info.gs.output_primitive = GL_TRIANGLE_STRIP;
|
||||
nir->info.gs.input_primitive = SHADER_PRIM_TRIANGLES;
|
||||
nir->info.gs.output_primitive = SHADER_PRIM_TRIANGLE_STRIP;
|
||||
nir->info.gs.vertices_in = 3;
|
||||
nir->info.gs.vertices_out = 3;
|
||||
nir->info.gs.invocations = 1;
|
||||
|
|
|
@ -2210,19 +2210,19 @@ write_creation_feedback(struct v3dv_pipeline *pipeline,
|
|||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
static enum shader_prim
|
||||
multiview_gs_input_primitive_from_pipeline(struct v3dv_pipeline *pipeline)
|
||||
{
|
||||
switch (pipeline->topology) {
|
||||
case PIPE_PRIM_POINTS:
|
||||
return GL_POINTS;
|
||||
return SHADER_PRIM_POINTS;
|
||||
case PIPE_PRIM_LINES:
|
||||
case PIPE_PRIM_LINE_STRIP:
|
||||
return GL_LINES;
|
||||
return SHADER_PRIM_LINES;
|
||||
case PIPE_PRIM_TRIANGLES:
|
||||
case PIPE_PRIM_TRIANGLE_STRIP:
|
||||
case PIPE_PRIM_TRIANGLE_FAN:
|
||||
return GL_TRIANGLES;
|
||||
return SHADER_PRIM_TRIANGLES;
|
||||
default:
|
||||
/* Since we don't allow GS with multiview, we can only see non-adjacency
|
||||
* primitives.
|
||||
|
@ -2231,19 +2231,19 @@ multiview_gs_input_primitive_from_pipeline(struct v3dv_pipeline *pipeline)
|
|||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
static enum shader_prim
|
||||
multiview_gs_output_primitive_from_pipeline(struct v3dv_pipeline *pipeline)
|
||||
{
|
||||
switch (pipeline->topology) {
|
||||
case PIPE_PRIM_POINTS:
|
||||
return GL_POINTS;
|
||||
return SHADER_PRIM_POINTS;
|
||||
case PIPE_PRIM_LINES:
|
||||
case PIPE_PRIM_LINE_STRIP:
|
||||
return GL_LINE_STRIP;
|
||||
return SHADER_PRIM_LINE_STRIP;
|
||||
case PIPE_PRIM_TRIANGLES:
|
||||
case PIPE_PRIM_TRIANGLE_STRIP:
|
||||
case PIPE_PRIM_TRIANGLE_FAN:
|
||||
return GL_TRIANGLE_STRIP;
|
||||
return SHADER_PRIM_TRIANGLE_STRIP;
|
||||
default:
|
||||
/* Since we don't allow GS with multiview, we can only see non-adjacency
|
||||
* primitives.
|
||||
|
|
|
@ -1714,14 +1714,14 @@ emit_gs_shader_state_record(struct v3dv_job *job,
|
|||
}
|
||||
|
||||
static uint8_t
|
||||
v3d_gs_output_primitive(uint32_t prim_type)
|
||||
v3d_gs_output_primitive(enum shader_prim prim_type)
|
||||
{
|
||||
switch (prim_type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return GEOMETRY_SHADER_POINTS;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return GEOMETRY_SHADER_LINE_STRIP;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return GEOMETRY_SHADER_TRI_STRIP;
|
||||
default:
|
||||
unreachable("Unsupported primitive type");
|
||||
|
|
|
@ -1876,15 +1876,15 @@ set_shader_inout_layout(struct gl_shader *shader,
|
|||
}
|
||||
|
||||
if (state->gs_input_prim_type_specified) {
|
||||
shader->info.Geom.InputType = state->in_qualifier->prim_type;
|
||||
shader->info.Geom.InputType = (enum shader_prim)state->in_qualifier->prim_type;
|
||||
} else {
|
||||
shader->info.Geom.InputType = PRIM_UNKNOWN;
|
||||
shader->info.Geom.InputType = SHADER_PRIM_UNKNOWN;
|
||||
}
|
||||
|
||||
if (state->out_qualifier->flags.q.prim_type) {
|
||||
shader->info.Geom.OutputType = state->out_qualifier->prim_type;
|
||||
shader->info.Geom.OutputType = (enum shader_prim)state->out_qualifier->prim_type;
|
||||
} else {
|
||||
shader->info.Geom.OutputType = PRIM_UNKNOWN;
|
||||
shader->info.Geom.OutputType = SHADER_PRIM_UNKNOWN;
|
||||
}
|
||||
|
||||
shader->info.Geom.Invocations = 0;
|
||||
|
|
|
@ -2164,8 +2164,8 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog,
|
|||
int vertices_out = -1;
|
||||
|
||||
gl_prog->info.gs.invocations = 0;
|
||||
gl_prog->info.gs.input_primitive = PRIM_UNKNOWN;
|
||||
gl_prog->info.gs.output_primitive = PRIM_UNKNOWN;
|
||||
gl_prog->info.gs.input_primitive = SHADER_PRIM_UNKNOWN;
|
||||
gl_prog->info.gs.output_primitive = SHADER_PRIM_UNKNOWN;
|
||||
|
||||
/* From the GLSL 1.50 spec, page 46:
|
||||
*
|
||||
|
@ -2180,26 +2180,26 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog,
|
|||
for (unsigned i = 0; i < num_shaders; i++) {
|
||||
struct gl_shader *shader = shader_list[i];
|
||||
|
||||
if (shader->info.Geom.InputType != PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.input_primitive != PRIM_UNKNOWN &&
|
||||
if (shader->info.Geom.InputType != SHADER_PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.input_primitive != SHADER_PRIM_UNKNOWN &&
|
||||
gl_prog->info.gs.input_primitive !=
|
||||
shader->info.Geom.InputType) {
|
||||
linker_error(prog, "geometry shader defined with conflicting "
|
||||
"input types\n");
|
||||
return;
|
||||
}
|
||||
gl_prog->info.gs.input_primitive = shader->info.Geom.InputType;
|
||||
gl_prog->info.gs.input_primitive = (enum shader_prim)shader->info.Geom.InputType;
|
||||
}
|
||||
|
||||
if (shader->info.Geom.OutputType != PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.output_primitive != PRIM_UNKNOWN &&
|
||||
if (shader->info.Geom.OutputType != SHADER_PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.output_primitive != SHADER_PRIM_UNKNOWN &&
|
||||
gl_prog->info.gs.output_primitive !=
|
||||
shader->info.Geom.OutputType) {
|
||||
linker_error(prog, "geometry shader defined with conflicting "
|
||||
"output types\n");
|
||||
return;
|
||||
}
|
||||
gl_prog->info.gs.output_primitive = shader->info.Geom.OutputType;
|
||||
gl_prog->info.gs.output_primitive = (enum shader_prim)shader->info.Geom.OutputType;
|
||||
}
|
||||
|
||||
if (shader->info.Geom.VerticesOut != -1) {
|
||||
|
@ -2231,13 +2231,13 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog,
|
|||
* since we already know we're in the right type of shader program
|
||||
* for doing it.
|
||||
*/
|
||||
if (gl_prog->info.gs.input_primitive == PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.input_primitive == SHADER_PRIM_UNKNOWN) {
|
||||
linker_error(prog,
|
||||
"geometry shader didn't declare primitive input type\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (gl_prog->info.gs.output_primitive == PRIM_UNKNOWN) {
|
||||
if (gl_prog->info.gs.output_primitive == SHADER_PRIM_UNKNOWN) {
|
||||
linker_error(prog,
|
||||
"geometry shader didn't declare primitive output type\n");
|
||||
return;
|
||||
|
|
|
@ -147,14 +147,14 @@ overwrite_incomplete_primitives(struct state *state, unsigned stream)
|
|||
assert(state->count_vtx_per_prim);
|
||||
|
||||
nir_builder *b = state->builder;
|
||||
unsigned outprim = b->shader->info.gs.output_primitive;
|
||||
enum shader_prim outprim = b->shader->info.gs.output_primitive;
|
||||
unsigned outprim_min_vertices;
|
||||
|
||||
if (outprim == GL_POINTS)
|
||||
if (outprim == SHADER_PRIM_POINTS)
|
||||
outprim_min_vertices = 1;
|
||||
else if (outprim == GL_LINE_STRIP)
|
||||
else if (outprim == SHADER_PRIM_LINE_STRIP)
|
||||
outprim_min_vertices = 2;
|
||||
else if (outprim == GL_TRIANGLE_STRIP)
|
||||
else if (outprim == SHADER_PRIM_TRIANGLE_STRIP)
|
||||
outprim_min_vertices = 3;
|
||||
else
|
||||
unreachable("Invalid GS output primitive type.");
|
||||
|
|
|
@ -1618,7 +1618,7 @@ destroy_print_state(print_state *state)
|
|||
static const char *
|
||||
primitive_name(unsigned primitive)
|
||||
{
|
||||
#define PRIM(X) case GL_ ## X : return #X
|
||||
#define PRIM(X) case SHADER_PRIM_ ## X : return #X
|
||||
switch (primitive) {
|
||||
PRIM(POINTS);
|
||||
PRIM(LINES);
|
||||
|
|
|
@ -1002,6 +1002,28 @@ enum tess_primitive_mode
|
|||
TESS_PRIMITIVE_ISOLINES,
|
||||
};
|
||||
|
||||
/* these also map directly to GL and gallium prim types. */
|
||||
enum shader_prim
|
||||
{
|
||||
SHADER_PRIM_POINTS,
|
||||
SHADER_PRIM_LINES,
|
||||
SHADER_PRIM_LINE_LOOP,
|
||||
SHADER_PRIM_LINE_STRIP,
|
||||
SHADER_PRIM_TRIANGLES,
|
||||
SHADER_PRIM_TRIANGLE_STRIP,
|
||||
SHADER_PRIM_TRIANGLE_FAN,
|
||||
SHADER_PRIM_QUADS,
|
||||
SHADER_PRIM_QUAD_STRIP,
|
||||
SHADER_PRIM_POLYGON,
|
||||
SHADER_PRIM_LINES_ADJACENCY,
|
||||
SHADER_PRIM_LINE_STRIP_ADJACENCY,
|
||||
SHADER_PRIM_TRIANGLES_ADJACENCY,
|
||||
SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY,
|
||||
SHADER_PRIM_PATCHES,
|
||||
SHADER_PRIM_MAX = SHADER_PRIM_PATCHES,
|
||||
SHADER_PRIM_UNKNOWN = (SHADER_PRIM_MAX * 2),
|
||||
};
|
||||
|
||||
/**
|
||||
* A compare function enum for use in compiler lowering passes. This is in
|
||||
* the same order as GL's compare functions (shifted down by GL_NEVER), and is
|
||||
|
|
|
@ -317,10 +317,10 @@ typedef struct shader_info {
|
|||
} vs;
|
||||
|
||||
struct {
|
||||
/** The output primitive type (GL enum value) */
|
||||
/** The output primitive type */
|
||||
uint16_t output_primitive;
|
||||
|
||||
/** The input primitive type (GL enum value) */
|
||||
/** The input primitive type */
|
||||
uint16_t input_primitive;
|
||||
|
||||
/** The maximum number of vertices the geometry shader might write. */
|
||||
|
|
|
@ -4282,32 +4282,30 @@ tess_primitive_mode_from_spv_execution_mode(struct vtn_builder *b,
|
|||
}
|
||||
}
|
||||
|
||||
static unsigned
|
||||
gl_primitive_from_spv_execution_mode(struct vtn_builder *b,
|
||||
SpvExecutionMode mode)
|
||||
static enum shader_prim
|
||||
primitive_from_spv_execution_mode(struct vtn_builder *b,
|
||||
SpvExecutionMode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case SpvExecutionModeInputPoints:
|
||||
case SpvExecutionModeOutputPoints:
|
||||
return 0; /* GL_POINTS */
|
||||
return SHADER_PRIM_POINTS;
|
||||
case SpvExecutionModeInputLines:
|
||||
case SpvExecutionModeOutputLinesNV:
|
||||
return 1; /* GL_LINES */
|
||||
return SHADER_PRIM_LINES;
|
||||
case SpvExecutionModeInputLinesAdjacency:
|
||||
return 0x000A; /* GL_LINES_ADJACENCY */
|
||||
return SHADER_PRIM_LINES_ADJACENCY;
|
||||
case SpvExecutionModeTriangles:
|
||||
case SpvExecutionModeOutputTrianglesNV:
|
||||
return 4; /* GL_TRIANGLES */
|
||||
return SHADER_PRIM_TRIANGLES;
|
||||
case SpvExecutionModeInputTrianglesAdjacency:
|
||||
return 0x000C; /* GL_TRIANGLES_ADJACENCY */
|
||||
return SHADER_PRIM_TRIANGLES_ADJACENCY;
|
||||
case SpvExecutionModeQuads:
|
||||
return 7; /* GL_QUADS */
|
||||
case SpvExecutionModeIsolines:
|
||||
return 0x8E7A; /* GL_ISOLINES */
|
||||
return SHADER_PRIM_QUADS;
|
||||
case SpvExecutionModeOutputLineStrip:
|
||||
return 3; /* GL_LINE_STRIP */
|
||||
return SHADER_PRIM_LINE_STRIP;
|
||||
case SpvExecutionModeOutputTriangleStrip:
|
||||
return 5; /* GL_TRIANGLE_STRIP */
|
||||
return SHADER_PRIM_TRIANGLE_STRIP;
|
||||
default:
|
||||
vtn_fail("Invalid primitive type: %s (%u)",
|
||||
spirv_executionmode_to_string(mode), mode);
|
||||
|
@ -5040,7 +5038,7 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
b->shader->info.gs.vertices_in =
|
||||
vertices_in_from_spv_execution_mode(b, mode->exec_mode);
|
||||
b->shader->info.gs.input_primitive =
|
||||
gl_primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5053,12 +5051,12 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
case SpvExecutionModeOutputTrianglesNV:
|
||||
vtn_assert(b->shader->info.stage == MESA_SHADER_MESH);
|
||||
b->shader->info.mesh.primitive_type =
|
||||
gl_primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
break;
|
||||
|
||||
case SpvExecutionModeOutputPoints: {
|
||||
const unsigned primitive =
|
||||
gl_primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
|
||||
switch (b->shader->info.stage) {
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
|
@ -5079,7 +5077,7 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
case SpvExecutionModeOutputTriangleStrip:
|
||||
vtn_assert(b->shader->info.stage == MESA_SHADER_GEOMETRY);
|
||||
b->shader->info.gs.output_primitive =
|
||||
gl_primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
primitive_from_spv_execution_mode(b, mode->exec_mode);
|
||||
break;
|
||||
|
||||
case SpvExecutionModeSpacingEqual:
|
||||
|
|
|
@ -901,13 +901,13 @@ tu6_emit_link_map(struct tu_cs *cs,
|
|||
}
|
||||
|
||||
static uint16_t
|
||||
gl_primitive_to_tess(uint16_t primitive) {
|
||||
primitive_to_tess(enum shader_prim primitive) {
|
||||
switch (primitive) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return TESS_POINTS;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return TESS_LINES;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return TESS_CW_TRIS;
|
||||
default:
|
||||
unreachable("");
|
||||
|
@ -1244,7 +1244,7 @@ tu6_emit_vpc(struct tu_cs *cs,
|
|||
tu6_emit_link_map(cs, vs, gs, SB6_GS_SHADER);
|
||||
}
|
||||
vertices_out = gs->shader->nir->info.gs.vertices_out - 1;
|
||||
output = gl_primitive_to_tess(gs->shader->nir->info.gs.output_primitive);
|
||||
output = primitive_to_tess(gs->shader->nir->info.gs.output_primitive);
|
||||
invocations = gs->shader->nir->info.gs.invocations - 1;
|
||||
/* Size of per-primitive alloction in ldlw memory in vec4s. */
|
||||
vec4_size = gs->shader->nir->info.gs.vertices_in *
|
||||
|
|
|
@ -2255,17 +2255,17 @@ crocus_update_compiled_sf(struct crocus_context *ice)
|
|||
key.attrs = ice->shaders.last_vue_map->slots_valid;
|
||||
|
||||
switch (ice->state.reduced_prim_mode) {
|
||||
case GL_TRIANGLES:
|
||||
case PIPE_PRIM_TRIANGLES:
|
||||
default:
|
||||
if (key.attrs & BITFIELD64_BIT(VARYING_SLOT_EDGE))
|
||||
key.primitive = BRW_SF_PRIM_UNFILLED_TRIS;
|
||||
else
|
||||
key.primitive = BRW_SF_PRIM_TRIANGLES;
|
||||
break;
|
||||
case GL_LINES:
|
||||
case PIPE_PRIM_LINES:
|
||||
key.primitive = BRW_SF_PRIM_LINES;
|
||||
break;
|
||||
case GL_POINTS:
|
||||
case PIPE_PRIM_POINTS:
|
||||
key.primitive = BRW_SF_PRIM_POINTS;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1004,13 +1004,13 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
|
|||
|
||||
uint32_t output;
|
||||
switch (gs->shader->nir->info.gs.output_primitive) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
output = TESS_POINTS;
|
||||
break;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
output = TESS_LINES;
|
||||
break;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
output = TESS_CW_TRIS;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -394,14 +394,14 @@ v3d_emit_gs_state_record(struct v3d_job *job,
|
|||
}
|
||||
|
||||
static uint8_t
|
||||
v3d_gs_output_primitive(uint32_t prim_type)
|
||||
v3d_gs_output_primitive(enum shader_prim prim_type)
|
||||
{
|
||||
switch (prim_type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return GEOMETRY_SHADER_POINTS;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return GEOMETRY_SHADER_LINE_STRIP;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return GEOMETRY_SHADER_TRI_STRIP;
|
||||
default:
|
||||
unreachable("Unsupported primitive type");
|
||||
|
|
|
@ -3431,35 +3431,33 @@ emit_cf_list(struct ntv_context *ctx, struct exec_list *list)
|
|||
}
|
||||
|
||||
static SpvExecutionMode
|
||||
get_input_prim_type_mode(uint16_t type)
|
||||
get_input_prim_type_mode(enum shader_prim type)
|
||||
{
|
||||
switch (type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return SpvExecutionModeInputPoints;
|
||||
case GL_LINES:
|
||||
case GL_LINE_LOOP:
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINES:
|
||||
case SHADER_PRIM_LINE_LOOP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return SpvExecutionModeInputLines;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case GL_TRIANGLES:
|
||||
case GL_TRIANGLE_FAN:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLE_FAN:
|
||||
return SpvExecutionModeTriangles;
|
||||
case GL_QUADS:
|
||||
case GL_QUAD_STRIP:
|
||||
case SHADER_PRIM_QUADS:
|
||||
case SHADER_PRIM_QUAD_STRIP:
|
||||
return SpvExecutionModeQuads;
|
||||
break;
|
||||
case GL_POLYGON:
|
||||
case SHADER_PRIM_POLYGON:
|
||||
unreachable("handle polygons in gs");
|
||||
break;
|
||||
case GL_LINES_ADJACENCY:
|
||||
case GL_LINE_STRIP_ADJACENCY:
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
case SHADER_PRIM_LINE_STRIP_ADJACENCY:
|
||||
return SpvExecutionModeInputLinesAdjacency;
|
||||
case GL_TRIANGLES_ADJACENCY:
|
||||
case GL_TRIANGLE_STRIP_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLES_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY:
|
||||
return SpvExecutionModeInputTrianglesAdjacency;
|
||||
break;
|
||||
case GL_ISOLINES:
|
||||
return SpvExecutionModeIsolines;
|
||||
default:
|
||||
debug_printf("unknown geometry shader input mode %u\n", type);
|
||||
unreachable("error!");
|
||||
|
@ -3469,38 +3467,36 @@ get_input_prim_type_mode(uint16_t type)
|
|||
return 0;
|
||||
}
|
||||
static SpvExecutionMode
|
||||
get_output_prim_type_mode(uint16_t type)
|
||||
get_output_prim_type_mode(enum shader_prim type)
|
||||
{
|
||||
switch (type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return SpvExecutionModeOutputPoints;
|
||||
case GL_LINES:
|
||||
case GL_LINE_LOOP:
|
||||
unreachable("GL_LINES/LINE_LOOP passed as gs output");
|
||||
case SHADER_PRIM_LINES:
|
||||
case SHADER_PRIM_LINE_LOOP:
|
||||
unreachable("SHADER_PRIM_LINES/LINE_LOOP passed as gs output");
|
||||
break;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return SpvExecutionModeOutputLineStrip;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return SpvExecutionModeOutputTriangleStrip;
|
||||
case GL_TRIANGLES:
|
||||
case GL_TRIANGLE_FAN: //FIXME: not sure if right for output
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLE_FAN: //FIXME: not sure if right for output
|
||||
return SpvExecutionModeTriangles;
|
||||
case GL_QUADS:
|
||||
case GL_QUAD_STRIP:
|
||||
case SHADER_PRIM_QUADS:
|
||||
case SHADER_PRIM_QUAD_STRIP:
|
||||
return SpvExecutionModeQuads;
|
||||
case GL_POLYGON:
|
||||
case SHADER_PRIM_POLYGON:
|
||||
unreachable("handle polygons in gs");
|
||||
break;
|
||||
case GL_LINES_ADJACENCY:
|
||||
case GL_LINE_STRIP_ADJACENCY:
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
case SHADER_PRIM_LINE_STRIP_ADJACENCY:
|
||||
unreachable("handle line adjacency in gs");
|
||||
break;
|
||||
case GL_TRIANGLES_ADJACENCY:
|
||||
case GL_TRIANGLE_STRIP_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLES_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY:
|
||||
unreachable("handle triangle adjacency in gs");
|
||||
break;
|
||||
case GL_ISOLINES:
|
||||
return SpvExecutionModeIsolines;
|
||||
default:
|
||||
debug_printf("unknown geometry shader output mode %u\n", type);
|
||||
unreachable("error!");
|
||||
|
|
|
@ -1606,17 +1606,16 @@ handle_bindless_var(nir_shader *nir, nir_variable *var, const struct glsl_type *
|
|||
}
|
||||
|
||||
static enum pipe_prim_type
|
||||
gl_prim_to_pipe(unsigned primitive_type)
|
||||
prim_to_pipe(enum shader_prim primitive_type)
|
||||
{
|
||||
switch (primitive_type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return PIPE_PRIM_POINTS;
|
||||
case GL_LINES:
|
||||
case GL_LINE_LOOP:
|
||||
case GL_LINE_STRIP:
|
||||
case GL_LINES_ADJACENCY:
|
||||
case GL_LINE_STRIP_ADJACENCY:
|
||||
case GL_ISOLINES:
|
||||
case SHADER_PRIM_LINES:
|
||||
case SHADER_PRIM_LINE_LOOP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
case SHADER_PRIM_LINE_STRIP_ADJACENCY:
|
||||
return PIPE_PRIM_LINES;
|
||||
default:
|
||||
return PIPE_PRIM_TRIANGLES;
|
||||
|
@ -1639,7 +1638,7 @@ get_shader_base_prim_type(struct nir_shader *nir)
|
|||
{
|
||||
switch (nir->info.stage) {
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
return gl_prim_to_pipe(nir->info.gs.output_primitive);
|
||||
return prim_to_pipe(nir->info.gs.output_primitive);
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
return nir->info.tess.point_mode ? PIPE_PRIM_POINTS : tess_prim_to_pipe(nir->info.tess._primitive_mode);
|
||||
default:
|
||||
|
|
|
@ -995,11 +995,11 @@ zink_bind_gs_state(struct pipe_context *pctx,
|
|||
struct zink_context *ctx = zink_context(pctx);
|
||||
if (!cso && !ctx->gfx_stages[PIPE_SHADER_GEOMETRY])
|
||||
return;
|
||||
bool had_points = ctx->gfx_stages[PIPE_SHADER_GEOMETRY] ? ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->nir->info.gs.output_primitive == GL_POINTS : false;
|
||||
bool had_points = ctx->gfx_stages[PIPE_SHADER_GEOMETRY] ? ctx->gfx_stages[PIPE_SHADER_GEOMETRY]->nir->info.gs.output_primitive == SHADER_PRIM_POINTS : false;
|
||||
bind_stage(ctx, PIPE_SHADER_GEOMETRY, cso);
|
||||
bind_last_vertex_stage(ctx);
|
||||
if (cso) {
|
||||
if (!had_points && ctx->last_vertex_stage->nir->info.gs.output_primitive == GL_POINTS)
|
||||
if (!had_points && ctx->last_vertex_stage->nir->info.gs.output_primitive == SHADER_PRIM_POINTS)
|
||||
ctx->gfx_pipeline_state.has_points++;
|
||||
} else {
|
||||
if (had_points)
|
||||
|
|
|
@ -889,7 +889,7 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
|
|||
}
|
||||
|
||||
pipeline->gs_output_lines = pipeline->pipeline_nir[MESA_SHADER_GEOMETRY] &&
|
||||
pipeline->pipeline_nir[MESA_SHADER_GEOMETRY]->info.gs.output_primitive == GL_LINES;
|
||||
pipeline->pipeline_nir[MESA_SHADER_GEOMETRY]->info.gs.output_primitive == SHADER_PRIM_LINES;
|
||||
|
||||
|
||||
bool has_fragment_shader = false;
|
||||
|
|
|
@ -63,16 +63,16 @@ brw_compile_clip(const struct brw_compiler *compiler,
|
|||
* do all three:
|
||||
*/
|
||||
switch (key->primitive) {
|
||||
case GL_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
if (key->do_unfilled)
|
||||
brw_emit_unfilled_clip( &c );
|
||||
else
|
||||
brw_emit_tri_clip( &c );
|
||||
break;
|
||||
case GL_LINES:
|
||||
case SHADER_PRIM_LINES:
|
||||
brw_emit_line_clip( &c );
|
||||
break;
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
brw_emit_point_clip( &c );
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -292,13 +292,13 @@ brw_compute_mue_map(struct nir_shader *nir, struct brw_mue_map *map)
|
|||
|
||||
unsigned vertices_per_primitive = 0;
|
||||
switch (nir->info.mesh.primitive_type) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
vertices_per_primitive = 1;
|
||||
break;
|
||||
case GL_LINES:
|
||||
case SHADER_PRIM_LINES:
|
||||
vertices_per_primitive = 2;
|
||||
break;
|
||||
case GL_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
vertices_per_primitive = 3;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -560,21 +560,21 @@ vec4_gs_visitor::gs_end_primitive()
|
|||
emit(OR(dst_reg(this->control_data_bits), this->control_data_bits, mask));
|
||||
}
|
||||
|
||||
static const GLuint gl_prim_to_hw_prim[GL_TRIANGLE_STRIP_ADJACENCY+1] = {
|
||||
[GL_POINTS] =_3DPRIM_POINTLIST,
|
||||
[GL_LINES] = _3DPRIM_LINELIST,
|
||||
[GL_LINE_LOOP] = _3DPRIM_LINELOOP,
|
||||
[GL_LINE_STRIP] = _3DPRIM_LINESTRIP,
|
||||
[GL_TRIANGLES] = _3DPRIM_TRILIST,
|
||||
[GL_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
|
||||
[GL_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
|
||||
[GL_QUADS] = _3DPRIM_QUADLIST,
|
||||
[GL_QUAD_STRIP] = _3DPRIM_QUADSTRIP,
|
||||
[GL_POLYGON] = _3DPRIM_POLYGON,
|
||||
[GL_LINES_ADJACENCY] = _3DPRIM_LINELIST_ADJ,
|
||||
[GL_LINE_STRIP_ADJACENCY] = _3DPRIM_LINESTRIP_ADJ,
|
||||
[GL_TRIANGLES_ADJACENCY] = _3DPRIM_TRILIST_ADJ,
|
||||
[GL_TRIANGLE_STRIP_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,
|
||||
static const GLuint gl_prim_to_hw_prim[SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY+1] = {
|
||||
[SHADER_PRIM_POINTS] =_3DPRIM_POINTLIST,
|
||||
[SHADER_PRIM_LINES] = _3DPRIM_LINELIST,
|
||||
[SHADER_PRIM_LINE_LOOP] = _3DPRIM_LINELOOP,
|
||||
[SHADER_PRIM_LINE_STRIP] = _3DPRIM_LINESTRIP,
|
||||
[SHADER_PRIM_TRIANGLES] = _3DPRIM_TRILIST,
|
||||
[SHADER_PRIM_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
|
||||
[SHADER_PRIM_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
|
||||
[SHADER_PRIM_QUADS] = _3DPRIM_QUADLIST,
|
||||
[SHADER_PRIM_QUAD_STRIP] = _3DPRIM_QUADSTRIP,
|
||||
[SHADER_PRIM_POLYGON] = _3DPRIM_POLYGON,
|
||||
[SHADER_PRIM_LINES_ADJACENCY] = _3DPRIM_LINELIST_ADJ,
|
||||
[SHADER_PRIM_LINE_STRIP_ADJACENCY] = _3DPRIM_LINESTRIP_ADJ,
|
||||
[SHADER_PRIM_TRIANGLES_ADJACENCY] = _3DPRIM_TRILIST_ADJ,
|
||||
[SHADER_PRIM_TRIANGLE_STRIP_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,
|
||||
};
|
||||
|
||||
} /* namespace brw */
|
||||
|
@ -632,7 +632,7 @@ brw_compile_gs(const struct brw_compiler *compiler,
|
|||
nir, &prog_data->static_vertex_count, nullptr, 1u);
|
||||
|
||||
if (compiler->devinfo->ver >= 7) {
|
||||
if (nir->info.gs.output_primitive == GL_POINTS) {
|
||||
if (nir->info.gs.output_primitive == SHADER_PRIM_POINTS) {
|
||||
/* When the output type is points, the geometry shader may output data
|
||||
* to multiple streams, and EndPrimitive() has no effect. So we
|
||||
* configure the hardware to interpret the control data as stream ID.
|
||||
|
|
|
@ -2560,12 +2560,12 @@ struct gl_shader_info
|
|||
* GL_TRIANGLES_ADJACENCY, or PRIM_UNKNOWN if it's not set in this
|
||||
* shader.
|
||||
*/
|
||||
GLenum16 InputType;
|
||||
enum shader_prim InputType;
|
||||
/**
|
||||
* GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP, or PRIM_UNKNOWN if
|
||||
* it's not set in this shader.
|
||||
*/
|
||||
GLenum16 OutputType;
|
||||
enum shader_prim OutputType;
|
||||
} Geom;
|
||||
|
||||
/**
|
||||
|
|
|
@ -103,8 +103,8 @@ _mesa_init_shader(struct gl_shader *shader)
|
|||
{
|
||||
shader->RefCount = 1;
|
||||
shader->info.Geom.VerticesOut = -1;
|
||||
shader->info.Geom.InputType = GL_TRIANGLES;
|
||||
shader->info.Geom.OutputType = GL_TRIANGLE_STRIP;
|
||||
shader->info.Geom.InputType = SHADER_PRIM_TRIANGLES;
|
||||
shader->info.Geom.OutputType = SHADER_PRIM_TRIANGLE_STRIP;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -114,34 +114,34 @@ enum dxil_resource_kind dxil_get_resource_kind(const struct glsl_type *type)
|
|||
unreachable("unexpected glsl type");
|
||||
}
|
||||
|
||||
enum dxil_input_primitive dxil_get_input_primitive(unsigned primitive)
|
||||
enum dxil_input_primitive dxil_get_input_primitive(enum shader_prim primitive)
|
||||
{
|
||||
switch (primitive) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return DXIL_INPUT_PRIMITIVE_POINT;
|
||||
case GL_LINES:
|
||||
case SHADER_PRIM_LINES:
|
||||
return DXIL_INPUT_PRIMITIVE_LINE;
|
||||
case GL_LINES_ADJACENCY:
|
||||
case SHADER_PRIM_LINES_ADJACENCY:
|
||||
return DXIL_INPUT_PRIMITIVE_LINES_ADJENCY;
|
||||
case GL_TRIANGLES:
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
return DXIL_INPUT_PRIMITIVE_TRIANGLE;
|
||||
case GL_TRIANGLES_ADJACENCY:
|
||||
case SHADER_PRIM_TRIANGLES_ADJACENCY:
|
||||
return DXIL_INPUT_PRIMITIVE_TRIANGLES_ADJENCY;
|
||||
default:
|
||||
unreachable("unhandled primitive topology");
|
||||
}
|
||||
}
|
||||
|
||||
enum dxil_primitive_topology dxil_get_primitive_topology(unsigned topology)
|
||||
enum dxil_primitive_topology dxil_get_primitive_topology(enum shader_prim topology)
|
||||
{
|
||||
switch (topology) {
|
||||
case GL_POINTS:
|
||||
case SHADER_PRIM_POINTS:
|
||||
return DXIL_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||
case GL_LINES:
|
||||
case SHADER_PRIM_LINES:
|
||||
return DXIL_PRIMITIVE_TOPOLOGY_LINE_LIST;
|
||||
case GL_LINE_STRIP:
|
||||
case SHADER_PRIM_LINE_STRIP:
|
||||
return DXIL_PRIMITIVE_TOPOLOGY_LINE_STRIP;
|
||||
case GL_TRIANGLE_STRIP:
|
||||
case SHADER_PRIM_TRIANGLE_STRIP:
|
||||
return DXIL_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
|
||||
default:
|
||||
unreachable("unhandled primitive topology");
|
||||
|
|
Loading…
Reference in New Issue