void
fd3_emit_init_screen(struct pipe_screen *pscreen)
{
+ struct fd_screen *screen = fd_screen(pscreen);
+ screen->emit_const = fd3_emit_const;
+ screen->emit_const_bo = fd3_emit_const_bo;
}
void
fd3_emit_init(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
- ctx->emit_const = fd3_emit_const;
- ctx->emit_const_bo = fd3_emit_const_bo;
ctx->emit_ib = fd3_emit_ib;
}
void
fd4_emit_init_screen(struct pipe_screen *pscreen)
{
+ struct fd_screen *screen = fd_screen(pscreen);
+
+ screen->emit_const = fd4_emit_const;
+ screen->emit_const_bo = fd4_emit_const_bo;
}
void
fd4_emit_init(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
- ctx->emit_const = fd4_emit_const;
- ctx->emit_const_bo = fd4_emit_const_bo;
ctx->emit_ib = fd4_emit_ib;
ctx->mem_to_mem = fd4_mem_to_mem;
}
void
fd5_emit_init_screen(struct pipe_screen *pscreen)
{
+ struct fd_screen *screen = fd_screen(pscreen);
+ screen->emit_const = fd5_emit_const;
+ screen->emit_const_bo = fd5_emit_const_bo;
}
void
fd5_emit_init(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
- ctx->emit_const = fd5_emit_const;
- ctx->emit_const_bo = fd5_emit_const_bo;
ctx->emit_ib = fd5_emit_ib;
ctx->mem_to_mem = fd5_mem_to_mem;
}
void
fd6_emit_init_screen(struct pipe_screen *pscreen)
{
+ struct fd_screen *screen = fd_screen(pscreen);
+ screen->emit_const = fd6_emit_const;
+ screen->emit_const_bo = fd6_emit_const_bo;
}
void
fd6_emit_init(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
- ctx->emit_const = fd6_emit_const;
- ctx->emit_const_bo = fd6_emit_const_bo;
ctx->emit_ib = fd6_emit_ib;
ctx->mem_to_mem = fd6_mem_to_mem;
ctx->framebuffer_barrier = fd6_framebuffer_barrier;
/* compute: */
void (*launch_grid)(struct fd_context *ctx, const struct pipe_grid_info *info);
- /* constant emit: (note currently not used/needed for a2xx) */
- void (*emit_const)(struct fd_ringbuffer *ring, gl_shader_stage type,
- uint32_t regid, uint32_t offset, uint32_t sizedwords,
- const uint32_t *dwords, struct pipe_resource *prsc);
- /* emit bo addresses as constant: */
- void (*emit_const_bo)(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
- uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets);
-
/* indirect-branch emit: */
void (*emit_ib)(struct fd_ringbuffer *ring, struct fd_ringbuffer *target);
uint32_t (*setup_slices)(struct fd_resource *rsc);
unsigned (*tile_mode)(const struct pipe_resource *prsc);
+ /* constant emit: (note currently not used/needed for a2xx) */
+ void (*emit_const)(struct fd_ringbuffer *ring, gl_shader_stage type,
+ uint32_t regid, uint32_t offset, uint32_t sizedwords,
+ const uint32_t *dwords, struct pipe_resource *prsc);
+ /* emit bo addresses as constant: */
+ void (*emit_const_bo)(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
+ uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets);
+
int64_t cpu_gpu_time_delta;
struct fd_batch_cache batch_cache;
{
assert(dst_offset + size <= v->constlen * 4);
- ctx->emit_const(ring, v->type, dst_offset,
+ ctx->screen->emit_const(ring, v->type, dst_offset,
offset, size, user_buffer, buffer);
}
assert(offset * 4 + params < v->constlen * 4);
ring_wfi(ctx->batch, ring);
- ctx->emit_const_bo(ring, v->type, false, offset * 4, params, prscs, offsets);
+ ctx->screen->emit_const_bo(ring, v->type, false, offset * 4, params, prscs, offsets);
}
}
assert(offset * 4 + params < v->constlen * 4);
ring_wfi(ctx->batch, ring);
- ctx->emit_const_bo(ring, v->type, true, offset * 4, params, prscs, offsets);
+ ctx->screen->emit_const_bo(ring, v->type, true, offset * 4, params, prscs, offsets);
}
}