compiler: Rename shader_prim to mesa_prim and replace all usage of pipe_prim_type with mesa_prim
This is a prepare step to remove depends on p_defines.h in src/util/* This is done by: replace pipe_prim_type with mesa_prim replace shader_prim with mesa_prim replace PIPE_PRIM_MAX with MESA_PRIM_COUNT replace SHADER_PRIM_ with MESA_PRIM_ replace PIPE_PRIM_ with MESA_PRIM_ This patch only replace code only Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23369>
This commit is contained in:
@@ -63,16 +63,16 @@ brw_compile_clip(const struct brw_compiler *compiler,
|
||||
* do all three:
|
||||
*/
|
||||
switch (key->primitive) {
|
||||
case SHADER_PRIM_TRIANGLES:
|
||||
case MESA_PRIM_TRIANGLES:
|
||||
if (key->do_unfilled)
|
||||
brw_emit_unfilled_clip( &c );
|
||||
else
|
||||
brw_emit_tri_clip( &c );
|
||||
break;
|
||||
case SHADER_PRIM_LINES:
|
||||
case MESA_PRIM_LINES:
|
||||
brw_emit_line_clip( &c );
|
||||
break;
|
||||
case SHADER_PRIM_POINTS:
|
||||
case MESA_PRIM_POINTS:
|
||||
brw_emit_point_clip( &c );
|
||||
break;
|
||||
default:
|
||||
|
@@ -561,21 +561,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[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,
|
||||
static const GLuint gl_prim_to_hw_prim[MESA_PRIM_TRIANGLE_STRIP_ADJACENCY+1] = {
|
||||
[MESA_PRIM_POINTS] =_3DPRIM_POINTLIST,
|
||||
[MESA_PRIM_LINES] = _3DPRIM_LINELIST,
|
||||
[MESA_PRIM_LINE_LOOP] = _3DPRIM_LINELOOP,
|
||||
[MESA_PRIM_LINE_STRIP] = _3DPRIM_LINESTRIP,
|
||||
[MESA_PRIM_TRIANGLES] = _3DPRIM_TRILIST,
|
||||
[MESA_PRIM_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
|
||||
[MESA_PRIM_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
|
||||
[MESA_PRIM_QUADS] = _3DPRIM_QUADLIST,
|
||||
[MESA_PRIM_QUAD_STRIP] = _3DPRIM_QUADSTRIP,
|
||||
[MESA_PRIM_POLYGON] = _3DPRIM_POLYGON,
|
||||
[MESA_PRIM_LINES_ADJACENCY] = _3DPRIM_LINELIST_ADJ,
|
||||
[MESA_PRIM_LINE_STRIP_ADJACENCY] = _3DPRIM_LINESTRIP_ADJ,
|
||||
[MESA_PRIM_TRIANGLES_ADJACENCY] = _3DPRIM_TRILIST_ADJ,
|
||||
[MESA_PRIM_TRIANGLE_STRIP_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,
|
||||
};
|
||||
|
||||
} /* namespace brw */
|
||||
@@ -635,7 +635,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 == SHADER_PRIM_POINTS) {
|
||||
if (nir->info.gs.output_primitive == MESA_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.
|
||||
|
Reference in New Issue
Block a user