r600g/radeonsi: use the correct types (taken from pipe_draw_info)

Note: si_shader.h has also "type" variable that should be changed to
"enum pipe_prim_type", however it triggers a bunch of warnings about
unhandled switches, so due not knowing the correct way to handle them, I
decided to leave it as is.

Signed-off-by: Constantine Kharlamov <Hi-Angel@yandex.ru>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
Constantine Kharlamov
2017-04-02 20:33:04 +03:00
committed by Marek Olšák
parent ef62a7651c
commit fa8bc90990
3 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -29,6 +29,7 @@
#include "radeon/r600_pipe_common.h"
#include "radeon/r600_cs.h"
#include "r600_public.h"
#include "pipe/p_defines.h"
#include "util/u_suballoc.h"
#include "util/list.h"
@@ -318,8 +319,7 @@ struct r600_pipe_shader_selector {
unsigned num_shaders;
/* PIPE_SHADER_[VERTEX|FRAGMENT|...] */
unsigned type;
enum pipe_shader_type type;
/* geometry shader properties */
unsigned gs_output_prim;
@@ -511,8 +511,8 @@ struct r600_context {
struct pipe_index_buffer index_buffer;
/* Last draw state (-1 = unset). */
int last_primitive_type; /* Last primitive type used in draw_vbo. */
int last_start_instance;
enum pipe_prim_type last_primitive_type; /* Last primitive type used in draw_vbo. */
unsigned last_start_instance;
void *sb_context;
struct r600_isa *isa;
+1 -1
View File
@@ -348,7 +348,7 @@ struct si_context {
int last_multi_vgt_param;
int last_rast_prim;
unsigned last_sc_line_stipple;
int current_rast_prim; /* primitive type after TES, GS */
enum pipe_prim_type current_rast_prim; /* primitive type after TES, GS */
bool gs_tri_strip_adj_fix;
/* Scratch buffer */
+3 -2
View File
@@ -468,7 +468,7 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
static void si_emit_rasterizer_prim_state(struct si_context *sctx)
{
struct radeon_winsys_cs *cs = sctx->b.gfx.cs;
unsigned rast_prim = sctx->current_rast_prim;
enum pipe_prim_type rast_prim = sctx->current_rast_prim;
struct si_state_rasterizer *rs = sctx->emitted.named.rasterizer;
/* Skip this if not rendering lines. */
@@ -1091,7 +1091,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
const struct pipe_index_buffer *ib = &sctx->index_buffer;
struct pipe_index_buffer ib_tmp; /* for index buffer uploads only */
unsigned mask, dirty_tex_counter, rast_prim;
unsigned mask, dirty_tex_counter;
enum pipe_prim_type rast_prim;
if (likely(!info->indirect)) {
/* SI-CI treat instance_count==0 as instance_count==1. There is