}
}
+void
+nvc0_compute_validate_globals(struct nvc0_context *nvc0)
+{
+ unsigned i;
+
+ for (i = 0; i < nvc0->global_residents.size / sizeof(struct pipe_resource *);
+ ++i) {
+ struct pipe_resource *res = *util_dynarray_element(
+ &nvc0->global_residents, struct pipe_resource *, i);
+ if (res)
+ nvc0_add_resident(nvc0->bufctx_cp, NVC0_BIND_CP_GLOBAL,
+ nv04_resource(res), NOUVEAU_BO_RDWR);
+ }
+}
+
static bool
nvc0_compute_state_validate(struct nvc0_context *nvc0)
{
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);
bool nvc0_state_validate(struct nvc0_context *, uint32_t state_mask);
/* nvc0_surface.c */
/* nvc0_compute.c */
void nvc0_launch_grid(struct pipe_context *, const struct pipe_grid_info *);
+void nvc0_compute_validate_globals(struct nvc0_context *);
#endif
nvc0->dirty_cp |= NVC0_NEW_CP_DRIVERCONST;
}
-void
-nvc0_validate_global_residents(struct nvc0_context *nvc0,
- struct nouveau_bufctx *bctx, int bin)
-{
- unsigned i;
-
- for (i = 0; i < nvc0->global_residents.size / sizeof(struct pipe_resource *);
- ++i) {
- struct pipe_resource *res = *util_dynarray_element(
- &nvc0->global_residents, struct pipe_resource *, i);
- if (res)
- nvc0_add_resident(bctx, bin, nv04_resource(res), NOUVEAU_BO_RDWR);
- }
-}
-
static void
nvc0_validate_derived_1(struct nvc0_context *nvc0)
{
if (nvc0->dirty_cp & NVC0_NEW_CP_SURFACES)
nve4_compute_validate_surfaces(nvc0);
if (nvc0->dirty_cp & NVC0_NEW_CP_GLOBALS)
- nvc0_validate_global_residents(nvc0,
- nvc0->bufctx_cp, NVC0_BIND_CP_GLOBAL);
+ nvc0_compute_validate_globals(nvc0);
nvc0_bufctx_fence(nvc0, nvc0->bufctx_cp, false);