radeonsi: make si_restore_qbo_state externally available
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
committed by
Marek Olšák
parent
04e27ec136
commit
064f195ef0
@@ -1461,20 +1461,6 @@ bool si_query_hw_get_result(struct si_context *sctx,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void si_restore_qbo_state(struct si_context *sctx,
|
||||
struct si_qbo_state *st)
|
||||
{
|
||||
sctx->b.bind_compute_state(&sctx->b, st->saved_compute);
|
||||
|
||||
sctx->b.set_constant_buffer(&sctx->b, PIPE_SHADER_COMPUTE, 0, &st->saved_const0);
|
||||
pipe_resource_reference(&st->saved_const0.buffer, NULL);
|
||||
|
||||
sctx->b.set_shader_buffers(&sctx->b, PIPE_SHADER_COMPUTE, 0, 3, st->saved_ssbo,
|
||||
st->saved_ssbo_writable_mask);
|
||||
for (unsigned i = 0; i < 3; ++i)
|
||||
pipe_resource_reference(&st->saved_ssbo[i].buffer, NULL);
|
||||
}
|
||||
|
||||
static void si_query_hw_get_result_resource(struct si_context *sctx,
|
||||
struct si_query *squery,
|
||||
bool wait,
|
||||
|
||||
@@ -1371,6 +1371,19 @@ void si_save_qbo_state(struct si_context *sctx, struct si_qbo_state *st)
|
||||
}
|
||||
}
|
||||
|
||||
void si_restore_qbo_state(struct si_context *sctx, struct si_qbo_state *st)
|
||||
{
|
||||
sctx->b.bind_compute_state(&sctx->b, st->saved_compute);
|
||||
|
||||
sctx->b.set_constant_buffer(&sctx->b, PIPE_SHADER_COMPUTE, 0, &st->saved_const0);
|
||||
pipe_resource_reference(&st->saved_const0.buffer, NULL);
|
||||
|
||||
sctx->b.set_shader_buffers(&sctx->b, PIPE_SHADER_COMPUTE, 0, 3, st->saved_ssbo,
|
||||
st->saved_ssbo_writable_mask);
|
||||
for (unsigned i = 0; i < 3; ++i)
|
||||
pipe_resource_reference(&st->saved_ssbo[i].buffer, NULL);
|
||||
}
|
||||
|
||||
static void si_emit_db_render_state(struct si_context *sctx)
|
||||
{
|
||||
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
|
||||
|
||||
@@ -557,6 +557,7 @@ si_create_sampler_view_custom(struct pipe_context *ctx,
|
||||
void si_update_fb_dirtiness_after_rendering(struct si_context *sctx);
|
||||
void si_update_ps_iter_samples(struct si_context *sctx);
|
||||
void si_save_qbo_state(struct si_context *sctx, struct si_qbo_state *st);
|
||||
void si_restore_qbo_state(struct si_context *sctx, struct si_qbo_state *st);
|
||||
void si_set_occlusion_query_state(struct si_context *sctx,
|
||||
bool old_perfect_enable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user