ilo: honor render condition in blitter
Make pass_render_condition() available for blitter, and check for render condition in (and only in) clear(), clear_render_target(), and clear_depth_stencil().
This commit is contained in:
parent
5f4b769127
commit
c8240c9dea
|
@ -426,9 +426,10 @@ update_prim_count(struct ilo_3d *hw3d, int generated, int emitted)
|
|||
q->data.u64 += emitted;
|
||||
}
|
||||
|
||||
static bool
|
||||
pass_render_condition(struct ilo_3d *hw3d, struct pipe_context *pipe)
|
||||
bool
|
||||
ilo_3d_pass_render_condition(struct ilo_context *ilo)
|
||||
{
|
||||
struct ilo_3d *hw3d = ilo->hw3d;
|
||||
uint64_t result;
|
||||
bool wait;
|
||||
|
||||
|
@ -447,13 +448,11 @@ pass_render_condition(struct ilo_3d *hw3d, struct pipe_context *pipe)
|
|||
break;
|
||||
}
|
||||
|
||||
if (pipe->get_query_result(pipe, hw3d->render_condition.query,
|
||||
wait, (union pipe_query_result *) &result)) {
|
||||
if (ilo->base.get_query_result(&ilo->base, hw3d->render_condition.query,
|
||||
wait, (union pipe_query_result *) &result))
|
||||
return (!result == hw3d->render_condition.cond);
|
||||
}
|
||||
else {
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
#define UPDATE_MIN2(a, b) (a) = MIN2((a), (b))
|
||||
|
@ -698,7 +697,7 @@ ilo_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
|||
struct ilo_3d *hw3d = ilo->hw3d;
|
||||
int prim_generated, prim_emitted;
|
||||
|
||||
if (!pass_render_condition(hw3d, pipe))
|
||||
if (!ilo_3d_pass_render_condition(ilo))
|
||||
return;
|
||||
|
||||
if (info->primitive_restart && info->indexed) {
|
||||
|
|
|
@ -82,6 +82,9 @@ ilo_3d_end_query(struct ilo_context *ilo, struct ilo_query *q);
|
|||
void
|
||||
ilo_3d_process_query(struct ilo_context *ilo, struct ilo_query *q);
|
||||
|
||||
bool
|
||||
ilo_3d_pass_render_condition(struct ilo_context *ilo);
|
||||
|
||||
void
|
||||
ilo_init_3d_functions(struct ilo_context *ilo);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "util/u_pack_color.h"
|
||||
#include "intel_reg.h"
|
||||
|
||||
#include "ilo_3d.h"
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_cp.h"
|
||||
#include "ilo_resource.h"
|
||||
|
@ -692,6 +693,9 @@ ilo_blitter_blt_clear_rt(struct ilo_blitter *blitter,
|
|||
union util_color packed;
|
||||
bool success;
|
||||
|
||||
if (!ilo_3d_pass_render_condition(blitter->ilo))
|
||||
return true;
|
||||
|
||||
switch (cpp) {
|
||||
case 1:
|
||||
mask = GEN6_BLT_MASK_8;
|
||||
|
@ -753,6 +757,9 @@ ilo_blitter_blt_clear_zs(struct ilo_blitter *blitter,
|
|||
struct pipe_box box;
|
||||
uint32_t val;
|
||||
|
||||
if (!ilo_3d_pass_render_condition(blitter->ilo))
|
||||
return true;
|
||||
|
||||
switch (zs->format) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
if (!(clear_flags & PIPE_CLEAR_DEPTH))
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "util/u_blitter.h"
|
||||
#include "util/u_surface.h"
|
||||
|
||||
#include "ilo_3d.h"
|
||||
#include "ilo_context.h"
|
||||
#include "ilo_blitter.h"
|
||||
|
||||
|
@ -67,6 +68,11 @@ ilo_blitter_pipe_begin(struct ilo_blitter *blitter,
|
|||
util_blitter_save_rasterizer(b, (void *) ilo->rasterizer);
|
||||
util_blitter_save_framebuffer(b, &ilo->fb.state);
|
||||
|
||||
util_blitter_save_render_condition(b,
|
||||
ilo->hw3d->render_condition.query,
|
||||
ilo->hw3d->render_condition.cond,
|
||||
ilo->hw3d->render_condition.mode);
|
||||
|
||||
util_blitter_save_fragment_sampler_states(b,
|
||||
ilo->sampler[PIPE_SHADER_FRAGMENT].count,
|
||||
(void **) ilo->sampler[PIPE_SHADER_FRAGMENT].cso);
|
||||
|
|
Loading…
Reference in New Issue