return r;
}
-void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid)
-{
- struct r600_block *block = ctx->ps_resources.blocks[rid];
-
- r600_context_pipe_state_set_resource(ctx, state, block);
-}
-
-void evergreen_context_pipe_state_set_vs_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid)
-{
- struct r600_block *block = ctx->vs_resources.blocks[rid];
-
- r600_context_pipe_state_set_resource(ctx, state, block);
-}
-
-void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid)
-{
- struct r600_block *block = ctx->fs_resources.blocks[rid];
-
- r600_context_pipe_state_set_resource(ctx, state, block);
-}
-
static inline void evergreen_context_pipe_state_set_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset)
{
struct r600_range *range;
for (int i = 0; i < count; i++) {
if (resource[i]) {
- evergreen_context_pipe_state_set_vs_resource(rctx, &resource[i]->state,
- i + R600_MAX_CONST_BUFFERS);
+ r600_context_pipe_state_set_vs_resource(rctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
}
}
}
if (resource[i]) {
if (((struct r600_resource_texture *)resource[i]->base.texture)->depth)
has_depth = 1;
- evergreen_context_pipe_state_set_ps_resource(rctx, &resource[i]->state,
- i + R600_MAX_CONST_BUFFERS);
+ r600_context_pipe_state_set_ps_resource(rctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
} else
- evergreen_context_pipe_state_set_ps_resource(rctx, NULL,
- i + R600_MAX_CONST_BUFFERS);
+ r600_context_pipe_state_set_ps_resource(rctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference(
(struct pipe_sampler_view **)&rctx->ps_samplers.views[i],
}
for (i = count; i < NUM_TEX_UNITS; i++) {
if (rctx->ps_samplers.views[i]) {
- evergreen_context_pipe_state_set_ps_resource(rctx, NULL,
- i + R600_MAX_CONST_BUFFERS);
+ r600_context_pipe_state_set_ps_resource(rctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference((struct pipe_sampler_view **)&rctx->ps_samplers.views[i], NULL);
}
}
void r600_context_block_resource_emit_dirty(struct r600_context *ctx, struct r600_block *block);
int evergreen_context_init(struct r600_context *ctx);
-void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid);
-void evergreen_context_pipe_state_set_vs_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid);
-void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid);
void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
/* Zero states. */
for (i = 0; i < count; i++) {
if (!buffers[i].buffer) {
- if (rctx->chip_class >= EVERGREEN) {
- evergreen_context_pipe_state_set_fs_resource(rctx, NULL, i);
- } else {
- r600_context_pipe_state_set_fs_resource(rctx, NULL, i);
- }
+ r600_context_pipe_state_set_fs_resource(rctx, NULL, i);
}
}
for (; i < rctx->vbuf_mgr->nr_real_vertex_buffers; i++) {
- if (rctx->chip_class >= EVERGREEN) {
- evergreen_context_pipe_state_set_fs_resource(rctx, NULL, i);
- } else {
- r600_context_pipe_state_set_fs_resource(rctx, NULL, i);
- }
+ r600_context_pipe_state_set_fs_resource(rctx, NULL, i);
}
u_vbuf_set_vertex_buffers(rctx->vbuf_mgr, count, buffers);
if (rctx->chip_class >= EVERGREEN) {
evergreen_pipe_mod_buffer_resource(ctx, rstate, rbuffer, offset, 16, RADEON_USAGE_READ);
- evergreen_context_pipe_state_set_vs_resource(rctx, rstate, index);
} else {
r600_pipe_mod_buffer_resource(rstate, rbuffer, offset, 16, RADEON_USAGE_READ);
- r600_context_pipe_state_set_vs_resource(rctx, rstate, index);
}
+ r600_context_pipe_state_set_vs_resource(rctx, rstate, index);
break;
case PIPE_SHADER_FRAGMENT:
rctx->ps_const_buffer.nregs = 0;
}
if (rctx->chip_class >= EVERGREEN) {
evergreen_pipe_mod_buffer_resource(ctx, rstate, rbuffer, offset, 16, RADEON_USAGE_READ);
- evergreen_context_pipe_state_set_ps_resource(rctx, rstate, index);
} else {
r600_pipe_mod_buffer_resource(rstate, rbuffer, offset, 16, RADEON_USAGE_READ);
- r600_context_pipe_state_set_ps_resource(rctx, rstate, index);
}
+ r600_context_pipe_state_set_ps_resource(rctx, rstate, index);
break;
default:
R600_ERR("unsupported %d\n", shader);
if (rctx->chip_class >= EVERGREEN) {
evergreen_pipe_mod_buffer_resource(&rctx->context, rstate, rbuffer, offset, vertex_buffer->stride, RADEON_USAGE_READ);
- evergreen_context_pipe_state_set_fs_resource(rctx, rstate, i);
} else {
r600_pipe_mod_buffer_resource(rstate, rbuffer, offset, vertex_buffer->stride, RADEON_USAGE_READ);
- r600_context_pipe_state_set_fs_resource(rctx, rstate, i);
}
+ r600_context_pipe_state_set_fs_resource(rctx, rstate, i);
}
}