nv50,nvc0: remove unused parameter in nvXX_state_validate()
This 'words' parameter is there since 2011 but it has never been used. While we are at it, get rid of the extern declaration. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
@@ -230,9 +230,7 @@ void nv50_stream_output_validate(struct nv50_context *);
|
||||
extern void nv50_init_state_functions(struct nv50_context *);
|
||||
|
||||
/* nv50_state_validate.c */
|
||||
/* @words: check for space before emitting relocs */
|
||||
extern bool nv50_state_validate(struct nv50_context *, uint32_t state_mask,
|
||||
unsigned space_words);
|
||||
bool nv50_state_validate(struct nv50_context *, uint32_t state_mask);
|
||||
|
||||
/* nv50_surface.c */
|
||||
extern void nv50_clear(struct pipe_context *, unsigned buffers,
|
||||
|
||||
@@ -510,7 +510,7 @@ static struct state_validate {
|
||||
};
|
||||
|
||||
bool
|
||||
nv50_state_validate(struct nv50_context *nv50, uint32_t mask, unsigned words)
|
||||
nv50_state_validate(struct nv50_context *nv50, uint32_t mask)
|
||||
{
|
||||
uint32_t state_mask;
|
||||
int ret;
|
||||
|
||||
@@ -525,7 +525,7 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers,
|
||||
uint32_t mode = 0;
|
||||
|
||||
/* don't need NEW_BLEND, COLOR_MASK doesn't affect CLEAR_BUFFERS */
|
||||
if (!nv50_state_validate(nv50, NV50_NEW_FRAMEBUFFER, 9 + (fb->nr_cbufs * 2)))
|
||||
if (!nv50_state_validate(nv50, NV50_NEW_FRAMEBUFFER))
|
||||
return;
|
||||
|
||||
/* We have to clear ALL of the layers, not up to the min number of layers
|
||||
@@ -1340,7 +1340,7 @@ nv50_blit_3d(struct nv50_context *nv50, const struct pipe_blit_info *info)
|
||||
|
||||
nv50_blitctx_prepare_state(blit);
|
||||
|
||||
nv50_state_validate(nv50, ~0, 36);
|
||||
nv50_state_validate(nv50, ~0);
|
||||
|
||||
x_range = (float)info->src.box.width / (float)info->dst.box.width;
|
||||
y_range = (float)info->src.box.height / (float)info->dst.box.height;
|
||||
|
||||
@@ -790,7 +790,7 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
if (unlikely(nv50->num_so_targets && !nv50->gmtyprog))
|
||||
nv50->state.prim_size = nv50_pipe_prim_to_prim_size[info->mode];
|
||||
|
||||
nv50_state_validate(nv50, ~0, 8); /* 8 as minimum, we use flush_notify */
|
||||
nv50_state_validate(nv50, ~0);
|
||||
|
||||
push->kick_notify = nv50_draw_vbo_kick_notify;
|
||||
|
||||
|
||||
@@ -258,8 +258,7 @@ extern void nvc0_init_state_functions(struct nvc0_context *);
|
||||
/* nvc0_state_validate.c */
|
||||
void nvc0_validate_global_residents(struct nvc0_context *,
|
||||
struct nouveau_bufctx *, int bin);
|
||||
extern bool nvc0_state_validate(struct nvc0_context *, uint32_t state_mask,
|
||||
unsigned space_words);
|
||||
bool nvc0_state_validate(struct nvc0_context *, uint32_t state_mask);
|
||||
|
||||
/* nvc0_surface.c */
|
||||
extern void nvc0_clear(struct pipe_context *, unsigned buffers,
|
||||
|
||||
@@ -703,7 +703,7 @@ static struct state_validate {
|
||||
};
|
||||
|
||||
bool
|
||||
nvc0_state_validate(struct nvc0_context *nvc0, uint32_t mask, unsigned words)
|
||||
nvc0_state_validate(struct nvc0_context *nvc0, uint32_t mask)
|
||||
{
|
||||
uint32_t state_mask;
|
||||
int ret;
|
||||
|
||||
@@ -693,7 +693,7 @@ nvc0_clear(struct pipe_context *pipe, unsigned buffers,
|
||||
uint32_t mode = 0;
|
||||
|
||||
/* don't need NEW_BLEND, COLOR_MASK doesn't affect CLEAR_BUFFERS */
|
||||
if (!nvc0_state_validate(nvc0, NVC0_NEW_FRAMEBUFFER, 9 + (fb->nr_cbufs * 2)))
|
||||
if (!nvc0_state_validate(nvc0, NVC0_NEW_FRAMEBUFFER))
|
||||
return;
|
||||
|
||||
if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
|
||||
@@ -1191,7 +1191,7 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
|
||||
nvc0_blitctx_prepare_state(blit);
|
||||
|
||||
nvc0_state_validate(nvc0, ~0, 48);
|
||||
nvc0_state_validate(nvc0, ~0);
|
||||
|
||||
x_range = (float)info->src.box.width / (float)info->dst.box.width;
|
||||
y_range = (float)info->src.box.height / (float)info->dst.box.height;
|
||||
|
||||
@@ -967,8 +967,7 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
IMMED_NVC0(push, NVC0_3D(PATCH_VERTICES), nvc0->state.patch_vertices);
|
||||
}
|
||||
|
||||
/* 8 as minimum to avoid immediate double validation of new buffers */
|
||||
nvc0_state_validate(nvc0, ~0, 8);
|
||||
nvc0_state_validate(nvc0, ~0);
|
||||
|
||||
if (nvc0->vertprog->vp.need_draw_parameters) {
|
||||
PUSH_SPACE(push, 9);
|
||||
|
||||
Reference in New Issue
Block a user