diff --git a/src/gallium/drivers/vc4/vc4_draw.c
b/src/gallium/drivers/vc4/vc4_draw.c
index cf3f5e0..773caf7 100644
--- a/src/gallium/drivers/vc4/vc4_draw.c
+++ b/src/gallium/drivers/vc4/vc4_draw.c
@@ -490,29 +490,31 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers,
vc4->draw_max_y = vc4->framebuffer.height;
vc4->cleared |= buffers;
vc4->resolve |= buffers;
vc4_start_draw(vc4, 0);
}
static void
vc4_clear_render_target(struct pipe_context *pctx, struct pipe_surface *ps,
const union pipe_color_union *color,
- unsigned x, unsigned y, unsigned w, unsigned h)
+ unsigned x, unsigned y, unsigned w, unsigned h,
+ bool render_condition_enabled)
{
fprintf(stderr, "unimpl: clear RT\n");
}
static void
vc4_clear_depth_stencil(struct pipe_context *pctx, struct pipe_surface *ps,
unsigned buffers, double depth, unsigned stencil,
- unsigned x, unsigned y, unsigned w, unsigned h)
+ unsigned x, unsigned y, unsigned w, unsigned h,
+ bool render_condition_enabled)
{
fprintf(stderr, "unimpl: clear DS\n");
}
void
vc4_draw_init(struct pipe_context *pctx)
{
pctx->draw_vbo = vc4_draw_vbo;
pctx->clear = vc4_clear;
pctx->clear_render_target = vc4_clear_render_target;
diff --git a/src/gallium/include/pipe/p_context.h
b/src/gallium/include/pipe/p_context.h
index f1de189..5359164 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -409,35 +409,37 @@ struct pipe_context {
unsigned stencil);
/**
* Clear a color rendertarget surface.
* \param color pointer to an union of fiu array for each of r, g, b, a.
*/
void (*clear_render_target)(struct pipe_context *pipe,
struct pipe_surface *dst,
const union pipe_color_union *color,
unsigned dstx, unsigned dsty,
- unsigned width, unsigned height);
+ unsigned width, unsigned height,
+ bool render_condition_enabled);
/**
* Clear a depth-stencil surface.
* \param clear_flags bitfield of PIPE_CLEAR_DEPTH/STENCIL values.
* \param depth depth clear value in [0,1].
* \param stencil stencil clear value
*/
void (*clear_depth_stencil)(struct pipe_context *pipe,
struct pipe_surface *dst,
unsigned clear_flags,
double depth,
unsigned stencil,
unsigned dstx, unsigned dsty,
- unsigned width, unsigned height);
+ unsigned width, unsigned height,
+ bool render_condition_enabled);
/**
* Clear the texture with the specified texel. Not guaranteed to be a
* renderable format. Data provided in the resource's format.
*/
void (*clear_texture)(struct pipe_context *pipe,
struct pipe_resource *res,
unsigned level,
const struct pipe_box *box,
const void *data);
diff --git a/src/gallium/state_trackers/nine/device9.c
b/src/gallium/state_trackers/nine/device9.c
index b4ce3c8..d233304 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1745,21 +1745,21 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
fallback = !(surf->base.info.bind & PIPE_BIND_RENDER_TARGET);
if (!fallback) {
psurf = NineSurface9_GetSurface(surf, 0);
if (!psurf)
fallback = TRUE;
}
if (!fallback) {
- pipe->clear_render_target(pipe, psurf, &rgba, x, y, w, h);
+ pipe->clear_render_target(pipe, psurf, &rgba, x, y, w, h, false);
} else {
D3DLOCKED_RECT lock;
union util_color uc;
HRESULT hr;
/* XXX: lock pRect and fix util_fill_rect */
hr = NineSurface9_LockRect(surf, &lock, NULL, 0);
if (FAILED(hr))
return hr;
util_pack_color_ub(color >> 16, color >> 8, color >> 0, color >> 24,
surf->base.info.format, &uc);
@@ -2030,21 +2030,21 @@ NineDevice9_Clear( struct NineDevice9 *This,
if (pRects[r].y1 > pRects[r].y2) continue;
#endif
x1 = MAX2(x1, rect.x1);
y1 = MAX2(y1, rect.y1);
x2 = MIN3(x2, rect.x2, rt->desc.Width);
y2 = MIN3(y2, rect.y2, rt->desc.Height);
DBG("Clearing (%u..%u)x(%u..%u)\n", x1, x2, y1, y2);
pipe->clear_render_target(pipe, cbuf, &rgba,
- x1, y1, x2 - x1, y2 - y1);
+ x1, y1, x2 - x1, y2 - y1, false);
}
}
if (!(bufs & PIPE_CLEAR_DEPTHSTENCIL))
return D3D_OK;
bufs &= PIPE_CLEAR_DEPTHSTENCIL;
for (r = 0; r < Count; ++r) {
unsigned x1 = MIN2(pRects[r].x1, pRects[r].x2);
unsigned y1 = MIN2(pRects[r].y1, pRects[r].y2);
@@ -2057,21 +2057,21 @@ NineDevice9_Clear( struct NineDevice9 *This,
#endif
x1 = MIN2(x1, rect.x1);
y1 = MIN2(y1, rect.y1);
x2 = MIN3(x2, rect.x2, zsbuf_surf->desc.Width);
y2 = MIN3(y2, rect.y2, zsbuf_surf->desc.Height);
zsbuf = NineSurface9_GetSurface(zsbuf_surf, 0);
assert(zsbuf);
pipe->clear_depth_stencil(pipe, zsbuf, bufs, Z, Stencil,
- x1, y1, x2 - x1, y2 - y1);
+ x1, y1, x2 - x1, y2 - y1, false);
}
return D3D_OK;
}
HRESULT NINE_WINAPI
NineDevice9_SetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
const D3DMATRIX *pMatrix )
{
struct nine_state *state = This->update;
diff --git a/src/gallium/state_trackers/nine/surface9.c
b/src/gallium/state_trackers/nine/surface9.c
index 6a4a0d9..0cedd4e 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -157,21 +157,21 @@ NineSurface9_ctor( struct NineSurface9 *This,
This->desc = *pDesc;
This->stride = nine_format_get_stride(This->base.info.format,
pDesc->Width);
if (pResource && NineSurface9_IsOffscreenPlain(This))
pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
/* TODO: investigate what else exactly needs to be cleared */
if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET)) {
surf = NineSurface9_GetSurface(This, 0);
- pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width,
pDesc->Height);
+ pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width,
pDesc->Height, false);
}
NineSurface9_Dump(This);
return D3D_OK;
}
void
NineSurface9_dtor( struct NineSurface9 *This )
{
diff --git a/src/gallium/state_trackers/vdpau/surface.c
b/src/gallium/state_trackers/vdpau/surface.c
index 6dc479a..177483e 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -388,21 +388,21 @@ vlVdpVideoSurfaceClear(vlVdpSurface *vlsurf)
for (i = 0; i < VL_MAX_SURFACES; ++i) {
union pipe_color_union c = {};
if (!surfaces[i])
continue;
if (i > !!vlsurf->templat.interlaced)
c.f[0] = c.f[1] = c.f[2] = c.f[3] = 0.5f;
pipe->clear_render_target(pipe, surfaces[i], &c, 0, 0,
- surfaces[i]->width, surfaces[i]->height);
+ surfaces[i]->width, surfaces[i]->height,
false);
}
pipe->flush(pipe, NULL, 0);
}
/**
* Interop to mesa state tracker
*/
struct pipe_video_buffer *vlVdpVideoSurfaceGallium(VdpVideoSurface surface)
{
vlVdpSurface *p_surf = vlGetDataHTAB(surface);