nvc0: remove dead surface tracking code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35806>
This commit is contained in:
@@ -219,11 +219,6 @@ nvc0_context_unreference_resources(struct nvc0_context *nvc0)
|
||||
}
|
||||
}
|
||||
|
||||
for (s = 0; s < 2; ++s) {
|
||||
for (i = 0; i < NVC0_MAX_SURFACE_SLOTS; ++i)
|
||||
pipe_surface_reference(&nvc0->surfaces[s][i], NULL);
|
||||
}
|
||||
|
||||
for (i = 0; i < nvc0->num_tfbbufs; ++i)
|
||||
pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
|
||||
|
||||
|
||||
@@ -271,11 +271,6 @@ struct nvc0_context {
|
||||
|
||||
struct nvc0_blitctx *blit;
|
||||
|
||||
/* NOTE: some of these surfaces may reference buffers */
|
||||
struct pipe_surface *surfaces[2][NVC0_MAX_SURFACE_SLOTS];
|
||||
uint16_t surfaces_dirty[2];
|
||||
uint16_t surfaces_valid[2];
|
||||
|
||||
struct pipe_shader_buffer buffers[6][NVC0_MAX_BUFFERS];
|
||||
uint32_t buffers_dirty[6];
|
||||
uint32_t buffers_valid[6];
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#define NVC0_MAX_CONST_BUFFERS 16
|
||||
#define NVC0_MAX_CONSTBUF_SIZE 65536
|
||||
|
||||
#define NVC0_MAX_SURFACE_SLOTS 16
|
||||
|
||||
#define NVC0_MAX_VIEWPORTS 16
|
||||
|
||||
#define NVC0_MAX_BUFFERS 32
|
||||
|
||||
@@ -1175,37 +1175,6 @@ nvc0_set_transform_feedback_targets(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nvc0_bind_surfaces_range(struct nvc0_context *nvc0, const unsigned t,
|
||||
unsigned start, unsigned nr,
|
||||
struct pipe_surface **psurfaces)
|
||||
{
|
||||
const unsigned end = start + nr;
|
||||
const unsigned mask = ((1 << nr) - 1) << start;
|
||||
unsigned i;
|
||||
|
||||
if (psurfaces) {
|
||||
for (i = start; i < end; ++i) {
|
||||
const unsigned p = i - start;
|
||||
if (psurfaces[p])
|
||||
nvc0->surfaces_valid[t] |= (1 << i);
|
||||
else
|
||||
nvc0->surfaces_valid[t] &= ~(1 << i);
|
||||
pipe_surface_reference(&nvc0->surfaces[t][i], psurfaces[p]);
|
||||
}
|
||||
} else {
|
||||
for (i = start; i < end; ++i)
|
||||
pipe_surface_reference(&nvc0->surfaces[t][i], NULL);
|
||||
nvc0->surfaces_valid[t] &= ~mask;
|
||||
}
|
||||
nvc0->surfaces_dirty[t] |= mask;
|
||||
|
||||
if (t == 0)
|
||||
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_SUF);
|
||||
else
|
||||
nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_SUF);
|
||||
}
|
||||
|
||||
static bool
|
||||
nvc0_bind_images_range(struct nvc0_context *nvc0, const unsigned s,
|
||||
unsigned start, unsigned nr,
|
||||
|
||||
Reference in New Issue
Block a user