mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
draw: use unsigned instead of uint
uint isn't a standard type, just something we accidentally get from some other headers. Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23833>
This commit is contained in:
parent
65591a3b25
commit
9486b9e785
13 changed files with 94 additions and 94 deletions
|
|
@ -553,15 +553,15 @@ draw_enable_point_sprites(struct draw_context *draw, boolean enable)
|
|||
int
|
||||
draw_alloc_extra_vertex_attrib(struct draw_context *draw,
|
||||
enum tgsi_semantic semantic_name,
|
||||
uint semantic_index)
|
||||
unsigned semantic_index)
|
||||
{
|
||||
int slot = draw_find_shader_output(draw, semantic_name, semantic_index);
|
||||
if (slot >= 0) {
|
||||
return slot;
|
||||
}
|
||||
|
||||
uint num_outputs = draw_current_shader_outputs(draw);
|
||||
uint n = draw->extra_shader_outputs.num;
|
||||
unsigned num_outputs = draw_current_shader_outputs(draw);
|
||||
unsigned n = draw->extra_shader_outputs.num;
|
||||
|
||||
assert(n < ARRAY_SIZE(draw->extra_shader_outputs.semantic_name));
|
||||
|
||||
|
|
@ -647,7 +647,7 @@ draw_prepare_shader_outputs(struct draw_context *draw)
|
|||
int
|
||||
draw_find_shader_output(const struct draw_context *draw,
|
||||
enum tgsi_semantic semantic_name,
|
||||
uint semantic_index)
|
||||
unsigned semantic_index)
|
||||
{
|
||||
const struct tgsi_shader_info *info = draw_get_shader_info(draw);
|
||||
|
||||
|
|
@ -678,7 +678,7 @@ draw_find_shader_output(const struct draw_context *draw,
|
|||
* If geometry shader is present, its output will be returned,
|
||||
* if not vertex shader is used.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_num_shader_outputs(const struct draw_context *draw)
|
||||
{
|
||||
const struct tgsi_shader_info *info = draw_get_shader_info(draw);
|
||||
|
|
@ -692,7 +692,7 @@ draw_num_shader_outputs(const struct draw_context *draw)
|
|||
* be filled in by some draw stages (such as AA point, AA line,
|
||||
* front face).
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_total_vs_outputs(const struct draw_context *draw)
|
||||
{
|
||||
const struct tgsi_shader_info *info = &draw->vs.vertex_shader->info;
|
||||
|
|
@ -707,7 +707,7 @@ draw_total_vs_outputs(const struct draw_context *draw)
|
|||
* be filled in by some draw stages (such as AA point, AA line, front
|
||||
* face).
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_total_gs_outputs(const struct draw_context *draw)
|
||||
{
|
||||
if (!draw->gs.geometry_shader)
|
||||
|
|
@ -720,7 +720,7 @@ draw_total_gs_outputs(const struct draw_context *draw)
|
|||
/**
|
||||
* Return total number of the tess ctrl shader outputs.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_total_tcs_outputs(const struct draw_context *draw)
|
||||
{
|
||||
if (!draw->tcs.tess_ctrl_shader)
|
||||
|
|
@ -733,7 +733,7 @@ draw_total_tcs_outputs(const struct draw_context *draw)
|
|||
/**
|
||||
* Return total number of the tess eval shader outputs.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_total_tes_outputs(const struct draw_context *draw)
|
||||
{
|
||||
if (!draw->tes.tess_eval_shader)
|
||||
|
|
@ -869,7 +869,7 @@ void draw_do_flush(struct draw_context *draw, unsigned flags)
|
|||
* outputs from the vertex shader.
|
||||
* \sa draw_num_shader_outputs
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_outputs(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -886,7 +886,7 @@ draw_current_shader_outputs(const struct draw_context *draw)
|
|||
* Return the index of the shader output which will contain the
|
||||
* vertex position.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_position_output(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -903,7 +903,7 @@ draw_current_shader_position_output(const struct draw_context *draw)
|
|||
* Return the index of the shader output which will contain the
|
||||
* viewport index.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_viewport_index_output(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -939,7 +939,7 @@ draw_current_shader_uses_viewport_index(const struct draw_context *draw)
|
|||
* Note we don't support clipvertex output in the gs. For clipping
|
||||
* to work correctly hence we return ordinary position output instead.
|
||||
*/
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_clipvertex_output(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -952,7 +952,7 @@ draw_current_shader_clipvertex_output(const struct draw_context *draw)
|
|||
}
|
||||
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_ccdistance_output(const struct draw_context *draw, int index)
|
||||
{
|
||||
assert(index < PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
|
||||
|
|
@ -966,7 +966,7 @@ draw_current_shader_ccdistance_output(const struct draw_context *draw, int index
|
|||
}
|
||||
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_num_written_clipdistances(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -978,7 +978,7 @@ draw_current_shader_num_written_clipdistances(const struct draw_context *draw)
|
|||
return draw->vs.vertex_shader->info.num_written_clipdistance;
|
||||
}
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_current_shader_num_written_culldistances(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
|
|||
|
|
@ -169,24 +169,24 @@ draw_prepare_shader_outputs(struct draw_context *draw);
|
|||
int
|
||||
draw_find_shader_output(const struct draw_context *draw,
|
||||
enum tgsi_semantic semantic_name,
|
||||
uint semantic_index);
|
||||
unsigned semantic_index);
|
||||
|
||||
boolean
|
||||
draw_will_inject_frontface(const struct draw_context *draw);
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_num_shader_outputs(const struct draw_context *draw);
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_total_vs_outputs(const struct draw_context *draw);
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_total_gs_outputs(const struct draw_context *draw);
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_total_tcs_outputs(const struct draw_context *draw);
|
||||
|
||||
uint
|
||||
unsigned
|
||||
draw_total_tes_outputs(const struct draw_context *draw);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ dup_vert(struct draw_stage *stage,
|
|||
unsigned idx)
|
||||
{
|
||||
struct vertex_header *tmp = stage->tmp[idx];
|
||||
const uint vsize = sizeof(struct vertex_header)
|
||||
const unsigned vsize = sizeof(struct vertex_header)
|
||||
+ draw_num_shader_outputs(stage->draw) * 4 * sizeof(float);
|
||||
memcpy(tmp, vert, vsize);
|
||||
tmp->vertex_id = UNDEFINED_VERTEX_ID;
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ struct aaline_stage
|
|||
float half_line_width;
|
||||
|
||||
/** For AA lines, this is the vertex attrib slot for new generic */
|
||||
uint coord_slot;
|
||||
unsigned coord_slot;
|
||||
/** position, not necessarily output zero */
|
||||
uint pos_slot;
|
||||
unsigned pos_slot;
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -135,7 +135,7 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
uint i;
|
||||
unsigned i;
|
||||
for (i = decl->Range.First;
|
||||
i <= decl->Range.Last; i++) {
|
||||
/*
|
||||
|
|
@ -285,7 +285,7 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
|||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
|
||||
uint i;
|
||||
unsigned i;
|
||||
|
||||
/*
|
||||
* Look for writes to result.color and replace with colorTemp reg.
|
||||
|
|
@ -314,7 +314,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
|
|||
const struct pipe_shader_state *orig_fs = &aaline->fs->state;
|
||||
struct pipe_shader_state aaline_fs;
|
||||
struct aa_transform_context transform;
|
||||
const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
|
||||
const unsigned newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
|
||||
|
||||
aaline_fs = *orig_fs; /* copy to init */
|
||||
|
||||
|
|
@ -415,8 +415,8 @@ aaline_line(struct draw_stage *stage, struct prim_header *header)
|
|||
const float half_width = aaline->half_line_width;
|
||||
struct prim_header tri;
|
||||
struct vertex_header *v[8];
|
||||
uint coordPos = aaline->coord_slot;
|
||||
uint posPos = aaline->pos_slot;
|
||||
unsigned coordPos = aaline->coord_slot;
|
||||
unsigned posPos = aaline->pos_slot;
|
||||
float *pos, *tex;
|
||||
float dx = header->v[1]->data[posPos][0] - header->v[0]->data[posPos][0];
|
||||
float dy = header->v[1]->data[posPos][1] - header->v[0]->data[posPos][1];
|
||||
|
|
@ -424,7 +424,7 @@ aaline_line(struct draw_stage *stage, struct prim_header *header)
|
|||
float c_a = dx / length, s_a = dy / length;
|
||||
float half_length = 0.5 * length;
|
||||
float t_l, t_w;
|
||||
uint i;
|
||||
unsigned i;
|
||||
|
||||
half_length = half_length + 0.5f;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ struct aapoint_stage
|
|||
int psize_slot;
|
||||
|
||||
/** this is the vertex attrib slot for the new texcoords */
|
||||
uint tex_slot;
|
||||
unsigned tex_slot;
|
||||
|
||||
/** vertex attrib slot containing position */
|
||||
uint pos_slot;
|
||||
unsigned pos_slot;
|
||||
|
||||
/** Type of Boolean variables on this hardware. */
|
||||
nir_alu_type bool_type;
|
||||
|
|
@ -153,7 +153,7 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
uint i;
|
||||
unsigned i;
|
||||
for (i = decl->Range.First;
|
||||
i <= decl->Range.Last; i++) {
|
||||
aactx->tempsUsed |= 1u << i;
|
||||
|
|
@ -176,7 +176,7 @@ aa_transform_prolog(struct tgsi_transform_context *ctx)
|
|||
struct tgsi_full_instruction newInst;
|
||||
const int texInput = aactx->maxInput + 1;
|
||||
int tmp0;
|
||||
uint i;
|
||||
unsigned i;
|
||||
|
||||
/* find two free temp regs */
|
||||
for (i = 0; i < 32; i++) {
|
||||
|
|
@ -365,7 +365,7 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
|
|||
const struct pipe_shader_state *orig_fs = &aapoint->fs->state;
|
||||
struct pipe_shader_state aapoint_fs;
|
||||
struct aa_transform_context transform;
|
||||
const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
|
||||
const unsigned newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS;
|
||||
struct pipe_context *pipe = aapoint->stage.draw->pipe;
|
||||
|
||||
aapoint_fs = *orig_fs; /* copy to init */
|
||||
|
|
@ -475,8 +475,8 @@ aapoint_point(struct draw_stage *stage, struct prim_header *header)
|
|||
const struct aapoint_stage *aapoint = aapoint_stage(stage);
|
||||
struct prim_header tri;
|
||||
struct vertex_header *v[4];
|
||||
const uint tex_slot = aapoint->tex_slot;
|
||||
const uint pos_slot = aapoint->pos_slot;
|
||||
const unsigned tex_slot = aapoint->tex_slot;
|
||||
const unsigned pos_slot = aapoint->pos_slot;
|
||||
float radius, *pos, *tex;
|
||||
float k;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ struct clip_stage {
|
|||
int cv_attr;
|
||||
|
||||
/* List of the attributes to be constant interpolated. */
|
||||
uint num_const_attribs;
|
||||
unsigned num_const_attribs;
|
||||
uint8_t const_attribs[PIPE_MAX_SHADER_OUTPUTS];
|
||||
/* List of the attributes to be linear interpolated. */
|
||||
uint num_linear_attribs;
|
||||
unsigned num_linear_attribs;
|
||||
uint8_t linear_attribs[PIPE_MAX_SHADER_OUTPUTS];
|
||||
/* List of the attributes to be perspective interpolated. */
|
||||
uint num_perspect_attribs;
|
||||
unsigned num_perspect_attribs;
|
||||
uint8_t perspect_attribs[PIPE_MAX_SHADER_OUTPUTS];
|
||||
|
||||
float (*plane)[4];
|
||||
|
|
@ -123,7 +123,7 @@ copy_flat(struct draw_stage *stage,
|
|||
{
|
||||
const struct clip_stage *clipper = clip_stage(stage);
|
||||
for (unsigned i = 0; i < clipper->num_const_attribs; i++) {
|
||||
const uint attr = clipper->const_attribs[i];
|
||||
const unsigned attr = clipper->const_attribs[i];
|
||||
COPY_4FV(dst->data[attr], src->data[attr]);
|
||||
}
|
||||
}
|
||||
|
|
@ -767,7 +767,7 @@ clip_tri(struct draw_stage *stage, struct prim_header *header)
|
|||
static enum tgsi_interpolate_mode
|
||||
find_interp(const struct draw_fragment_shader *fs,
|
||||
enum tgsi_interpolate_mode *indexed_interp,
|
||||
enum tgsi_semantic semantic_name, uint semantic_index)
|
||||
enum tgsi_semantic semantic_name, unsigned semantic_index)
|
||||
{
|
||||
enum tgsi_interpolate_mode interp;
|
||||
|
||||
|
|
@ -787,7 +787,7 @@ find_interp(const struct draw_fragment_shader *fs,
|
|||
* This probably only matters for layer, vpindex, culldist, maybe
|
||||
* front_face.
|
||||
*/
|
||||
uint j;
|
||||
unsigned j;
|
||||
if (semantic_name == TGSI_SEMANTIC_LAYER ||
|
||||
semantic_name == TGSI_SEMANTIC_VIEWPORT_INDEX) {
|
||||
interp = TGSI_INTERPOLATE_CONSTANT;
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ struct flat_stage
|
|||
{
|
||||
struct draw_stage stage;
|
||||
|
||||
uint num_flat_attribs;
|
||||
uint flat_attribs[PIPE_MAX_SHADER_OUTPUTS]; /* flatshaded attribs */
|
||||
unsigned num_flat_attribs;
|
||||
unsigned flat_attribs[PIPE_MAX_SHADER_OUTPUTS]; /* flatshaded attribs */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ copy_flats(struct draw_stage *stage,
|
|||
{
|
||||
const struct flat_stage *flat = flat_stage(stage);
|
||||
for (unsigned i = 0; i < flat->num_flat_attribs; i++) {
|
||||
const uint attr = flat->flat_attribs[i];
|
||||
const unsigned attr = flat->flat_attribs[i];
|
||||
COPY_4FV(dst->data[attr], src->data[attr]);
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ copy_flats2(struct draw_stage *stage,
|
|||
{
|
||||
const struct flat_stage *flat = flat_stage(stage);
|
||||
for (unsigned i = 0; i < flat->num_flat_attribs; i++) {
|
||||
const uint attr = flat->flat_attribs[i];
|
||||
const unsigned attr = flat->flat_attribs[i];
|
||||
COPY_4FV(dst0->data[attr], src->data[attr]);
|
||||
COPY_4FV(dst1->data[attr], src->data[attr]);
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ flatshade_line_1(struct draw_stage *stage,
|
|||
|
||||
static int
|
||||
find_interp(const struct draw_fragment_shader *fs, int *indexed_interp,
|
||||
enum tgsi_semantic semantic_name, uint semantic_index)
|
||||
enum tgsi_semantic semantic_name, unsigned semantic_index)
|
||||
{
|
||||
int interp;
|
||||
/* If it's gl_{Front,Back}{,Secondary}Color, pick up the mode
|
||||
|
|
@ -203,7 +203,7 @@ flatshade_init_state(struct draw_stage *stage)
|
|||
const struct draw_context *draw = stage->draw;
|
||||
const struct draw_fragment_shader *fs = draw->fs.fragment_shader;
|
||||
const struct tgsi_shader_info *info = draw_get_shader_info(draw);
|
||||
uint i, j;
|
||||
unsigned i, j;
|
||||
|
||||
/* Find which vertex shader outputs need constant interpolation, make a list */
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ struct pstip_fragment_shader
|
|||
struct pipe_shader_state state;
|
||||
void *driver_fs;
|
||||
void *pstip_fs;
|
||||
uint sampler_unit;
|
||||
unsigned sampler_unit;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -80,8 +80,8 @@ struct pstip_stage
|
|||
void *sampler_cso;
|
||||
struct pipe_resource *texture;
|
||||
struct pipe_sampler_view *sampler_view;
|
||||
uint num_samplers;
|
||||
uint num_sampler_views;
|
||||
unsigned num_samplers;
|
||||
unsigned num_sampler_views;
|
||||
|
||||
/*
|
||||
* Currently bound state
|
||||
|
|
@ -196,8 +196,8 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
|
|||
struct pstip_stage *pstip = pstip_stage(stage);
|
||||
struct pipe_context *pipe = pstip->pipe;
|
||||
struct draw_context *draw = stage->draw;
|
||||
uint num_samplers;
|
||||
uint num_sampler_views;
|
||||
unsigned num_samplers;
|
||||
unsigned num_sampler_views;
|
||||
|
||||
assert(stage->draw->rasterizer->poly_stipple_enable);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ screen_interp(struct draw_context *draw,
|
|||
const struct vertex_header *v0,
|
||||
const struct vertex_header *v1)
|
||||
{
|
||||
uint attr;
|
||||
uint num_outputs = draw_current_shader_outputs(draw);
|
||||
unsigned attr;
|
||||
unsigned num_outputs = draw_current_shader_outputs(draw);
|
||||
for (attr = 0; attr < num_outputs; attr++) {
|
||||
const float *val0 = v0->data[attr];
|
||||
const float *val1 = v1->data[attr];
|
||||
float *newv = dst->data[attr];
|
||||
uint i;
|
||||
unsigned i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
newv[i] = val0[i] + t * (val1[i] - val0[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ struct widepoint_stage {
|
|||
float ybias;
|
||||
|
||||
/** for automatic texcoord generation/replacement */
|
||||
uint num_texcoord_gen;
|
||||
uint texcoord_gen_slot[PIPE_MAX_SHADER_OUTPUTS];
|
||||
unsigned num_texcoord_gen;
|
||||
unsigned texcoord_gen_slot[PIPE_MAX_SHADER_OUTPUTS];
|
||||
|
||||
/* TGSI_SEMANTIC to which sprite_coord_enable applies */
|
||||
enum tgsi_semantic sprite_coord_semantic;
|
||||
|
|
@ -101,10 +101,10 @@ set_texcoords(const struct widepoint_stage *wide,
|
|||
{
|
||||
const struct draw_context *draw = wide->stage.draw;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
const uint texcoord_mode = rast->sprite_coord_mode;
|
||||
const unsigned texcoord_mode = rast->sprite_coord_mode;
|
||||
|
||||
for (unsigned i = 0; i < wide->num_texcoord_gen; i++) {
|
||||
const uint slot = wide->texcoord_gen_slot[i];
|
||||
const unsigned slot = wide->texcoord_gen_slot[i];
|
||||
v->data[slot][0] = tc[0];
|
||||
if (texcoord_mode == PIPE_SPRITE_COORD_LOWER_LEFT)
|
||||
v->data[slot][1] = 1.0f - tc[1];
|
||||
|
|
|
|||
|
|
@ -282,11 +282,11 @@ struct draw_context
|
|||
/** Vertex shader state */
|
||||
struct {
|
||||
struct draw_vertex_shader *vertex_shader;
|
||||
uint num_vs_outputs; /**< convenience, from vertex_shader */
|
||||
uint position_output;
|
||||
uint edgeflag_output;
|
||||
uint clipvertex_output;
|
||||
uint ccdistance_output[2];
|
||||
unsigned num_vs_outputs; /**< convenience, from vertex_shader */
|
||||
unsigned position_output;
|
||||
unsigned edgeflag_output;
|
||||
unsigned clipvertex_output;
|
||||
unsigned ccdistance_output[2];
|
||||
|
||||
/** Fields for TGSI interpreter / execution */
|
||||
struct {
|
||||
|
|
@ -306,9 +306,9 @@ struct draw_context
|
|||
/** Geometry shader state */
|
||||
struct {
|
||||
struct draw_geometry_shader *geometry_shader;
|
||||
uint num_gs_outputs; /**< convenience, from geometry_shader */
|
||||
uint position_output;
|
||||
uint clipvertex_output;
|
||||
unsigned num_gs_outputs; /**< convenience, from geometry_shader */
|
||||
unsigned position_output;
|
||||
unsigned clipvertex_output;
|
||||
|
||||
/** Fields for TGSI interpreter / execution */
|
||||
struct {
|
||||
|
|
@ -327,9 +327,9 @@ struct draw_context
|
|||
|
||||
struct {
|
||||
struct draw_tess_eval_shader *tess_eval_shader;
|
||||
uint num_tes_outputs; /**< convenience, from tess_eval_shader */
|
||||
uint position_output;
|
||||
uint clipvertex_output;
|
||||
unsigned num_tes_outputs; /**< convenience, from tess_eval_shader */
|
||||
unsigned position_output;
|
||||
unsigned clipvertex_output;
|
||||
} tes;
|
||||
|
||||
/** Fragment shader state */
|
||||
|
|
@ -339,15 +339,15 @@ struct draw_context
|
|||
|
||||
struct {
|
||||
struct draw_mesh_shader *mesh_shader;
|
||||
uint num_ms_outputs; /**< convenience, from geometry_shader */
|
||||
uint position_output;
|
||||
uint clipvertex_output;
|
||||
unsigned num_ms_outputs; /**< convenience, from geometry_shader */
|
||||
unsigned position_output;
|
||||
unsigned clipvertex_output;
|
||||
} ms;
|
||||
|
||||
/** Stream output (vertex feedback) state */
|
||||
struct {
|
||||
struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS];
|
||||
uint num_targets;
|
||||
unsigned num_targets;
|
||||
} so;
|
||||
|
||||
/* Clip derived state:
|
||||
|
|
@ -357,10 +357,10 @@ struct draw_context
|
|||
/* If a prim stage introduces new vertex attributes, they'll be stored here
|
||||
*/
|
||||
struct {
|
||||
uint num;
|
||||
unsigned num;
|
||||
enum tgsi_semantic semantic_name[DRAW_MAX_EXTRA_SHADER_OUTPUTS];
|
||||
uint semantic_index[DRAW_MAX_EXTRA_SHADER_OUTPUTS];
|
||||
uint slot[DRAW_MAX_EXTRA_SHADER_OUTPUTS];
|
||||
unsigned semantic_index[DRAW_MAX_EXTRA_SHADER_OUTPUTS];
|
||||
unsigned slot[DRAW_MAX_EXTRA_SHADER_OUTPUTS];
|
||||
} extra_shader_outputs;
|
||||
|
||||
unsigned instance_id;
|
||||
|
|
@ -439,16 +439,16 @@ void draw_gs_destroy(struct draw_context *draw);
|
|||
/*******************************************************************************
|
||||
* Common shading code:
|
||||
*/
|
||||
uint draw_current_shader_outputs(const struct draw_context *draw);
|
||||
uint draw_current_shader_position_output(const struct draw_context *draw);
|
||||
uint draw_current_shader_viewport_index_output(const struct draw_context *draw);
|
||||
uint draw_current_shader_clipvertex_output(const struct draw_context *draw);
|
||||
uint draw_current_shader_ccdistance_output(const struct draw_context *draw, int index);
|
||||
uint draw_current_shader_num_written_clipdistances(const struct draw_context *draw);
|
||||
uint draw_current_shader_num_written_culldistances(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_outputs(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_position_output(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_viewport_index_output(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_clipvertex_output(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_ccdistance_output(const struct draw_context *draw, int index);
|
||||
unsigned draw_current_shader_num_written_clipdistances(const struct draw_context *draw);
|
||||
unsigned draw_current_shader_num_written_culldistances(const struct draw_context *draw);
|
||||
int draw_alloc_extra_vertex_attrib(struct draw_context *draw,
|
||||
enum tgsi_semantic semantic_name,
|
||||
uint semantic_index);
|
||||
unsigned semantic_index);
|
||||
void draw_remove_extra_vertex_attribs(struct draw_context *draw);
|
||||
boolean draw_current_shader_uses_viewport_index(
|
||||
const struct draw_context *draw);
|
||||
|
|
|
|||
|
|
@ -251,13 +251,13 @@ draw_pt_destroy(struct draw_context *draw)
|
|||
*/
|
||||
static void
|
||||
draw_print_arrays(struct draw_context *draw, enum mesa_prim prim,
|
||||
int start, uint count, int index_bias)
|
||||
int start, unsigned count, int index_bias)
|
||||
{
|
||||
debug_printf("Draw arrays(prim = %u, start = %u, count = %u)\n",
|
||||
prim, start, count);
|
||||
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
uint ii = 0;
|
||||
unsigned ii = 0;
|
||||
|
||||
if (draw->pt.user.eltSize) {
|
||||
/* indexed arrays */
|
||||
|
|
@ -296,7 +296,7 @@ draw_print_arrays(struct draw_context *draw, enum mesa_prim prim,
|
|||
}
|
||||
|
||||
for (unsigned j = 0; j < draw->pt.nr_vertex_elements; j++) {
|
||||
uint buf = draw->pt.vertex_element[j].vertex_buffer_index;
|
||||
unsigned buf = draw->pt.vertex_element[j].vertex_buffer_index;
|
||||
ubyte *ptr = (ubyte *) draw->pt.user.vbuffer[buf].map;
|
||||
|
||||
if (draw->pt.vertex_element[j].instance_divisor) {
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ enum attrib_emit {
|
|||
*/
|
||||
struct vertex_info
|
||||
{
|
||||
uint num_attribs;
|
||||
unsigned num_attribs;
|
||||
uint32_t hwfmt[4]; /**< hardware format info for this format */
|
||||
uint size; /**< total vertex size in dwords */
|
||||
unsigned size; /**< total vertex size in dwords */
|
||||
|
||||
/* Keep this small and at the end of the struct to allow quick
|
||||
* memcmp() comparisons.
|
||||
|
|
@ -117,7 +117,7 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
|
|||
enum attrib_emit emit,
|
||||
int src_index)
|
||||
{
|
||||
const uint n = vinfo->num_attribs;
|
||||
const unsigned n = vinfo->num_attribs;
|
||||
|
||||
/* If the src_index is negative, meaning it hasn't been found
|
||||
* we'll assign it all zeros later - set to DRAW_ATTR_NONEXIST */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue