winsys/sw: propagate nboxes to displaytarget_display()
only a single box region is used Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
This commit is contained in:

committed by
Marge Bot

parent
3cca761934
commit
3aea0e31a4
@@ -852,7 +852,7 @@ d3d12_flush_frontbuffer(struct pipe_screen * pscreen,
|
||||
}
|
||||
#endif
|
||||
|
||||
winsys->displaytarget_display(winsys, res->dt, winsys_drawable_handle, sub_box);
|
||||
winsys->displaytarget_display(winsys, res->dt, winsys_drawable_handle, nboxes, sub_box);
|
||||
}
|
||||
|
||||
#ifndef _GAMING_XBOX
|
||||
|
@@ -866,7 +866,7 @@ llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
|
||||
llvmpipe_flush_resource(_pipe, resource, 0, true, true,
|
||||
false, "frontbuffer");
|
||||
winsys->displaytarget_display(winsys, texture->dt,
|
||||
context_private, sub_box);
|
||||
context_private, nboxes, sub_box);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -504,7 +504,7 @@ softpipe_flush_frontbuffer(struct pipe_screen *_screen,
|
||||
|
||||
assert(texture->dt);
|
||||
if (texture->dt)
|
||||
winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
|
||||
winsys->displaytarget_display(winsys, texture->dt, context_private, nboxes, sub_box);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@@ -132,6 +132,7 @@ struct sw_winsys
|
||||
(*displaytarget_display)( struct sw_winsys *ws,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box );
|
||||
|
||||
void
|
||||
|
@@ -242,6 +242,7 @@ static void
|
||||
dri_sw_displaytarget_display(struct sw_winsys *ws,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
struct dri_sw_winsys *dri_sw_ws = dri_sw_winsys(ws);
|
||||
@@ -257,7 +258,7 @@ dri_sw_displaytarget_display(struct sw_winsys *ws,
|
||||
*
|
||||
* PutImage correctly clips to the width of the dst drawable.
|
||||
*/
|
||||
if (box) {
|
||||
if (nboxes == 1) {
|
||||
offset = dri_sw_dt->stride * box->y;
|
||||
offset_x = box->x * blsize;
|
||||
data += offset;
|
||||
@@ -279,7 +280,7 @@ dri_sw_displaytarget_display(struct sw_winsys *ws,
|
||||
return;
|
||||
}
|
||||
|
||||
if (box)
|
||||
if (nboxes == 1)
|
||||
dri_sw_ws->lf->put_image2(dri_drawable, data,
|
||||
x, y, width, height, dri_sw_dt->stride);
|
||||
else
|
||||
|
@@ -252,6 +252,7 @@ static void
|
||||
gdi_sw_displaytarget_display(struct sw_winsys *_winsys,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
struct gdi_sw_winsys *winsys = gdi_sw_winsys(_winsys);
|
||||
@@ -302,4 +303,4 @@ HDC gdi_sw_acquire_hdc_by_value(void *context_private) {
|
||||
|
||||
void gdi_sw_release_hdc_by_value(void *context_private, HDC hdc) {
|
||||
// Nothing to do
|
||||
};
|
||||
};
|
||||
|
@@ -211,7 +211,8 @@ hgl_winsys_displaytarget_unmap(struct sw_winsys* winsys,
|
||||
static void
|
||||
hgl_winsys_displaytarget_display(struct sw_winsys* winsys,
|
||||
struct sw_displaytarget* displayTarget, void* contextPrivate,
|
||||
struct pipe_box *box)
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
assert(contextPrivate);
|
||||
|
||||
|
@@ -483,6 +483,7 @@ static void
|
||||
kms_sw_displaytarget_display(struct sw_winsys *ws,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
/* This function should not be called, instead the dri2 loader should
|
||||
|
@@ -116,6 +116,7 @@ static void
|
||||
null_sw_displaytarget_display(struct sw_winsys *winsys,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
assert(0);
|
||||
|
@@ -297,6 +297,7 @@ xlib_displaytarget_destroy(struct sw_winsys *ws,
|
||||
static void
|
||||
xlib_sw_display(struct xlib_drawable *xlib_drawable,
|
||||
struct sw_displaytarget *dt,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
static bool no_swap = false;
|
||||
@@ -314,7 +315,7 @@ xlib_sw_display(struct xlib_drawable *xlib_drawable,
|
||||
if (no_swap)
|
||||
return;
|
||||
|
||||
if (!box) {
|
||||
if (nboxes != 1) {
|
||||
_box.width = xlib_dt->width;
|
||||
_box.height = xlib_dt->height;
|
||||
box = &_box;
|
||||
@@ -390,10 +391,11 @@ static void
|
||||
xlib_displaytarget_display(struct sw_winsys *ws,
|
||||
struct sw_displaytarget *dt,
|
||||
void *context_private,
|
||||
unsigned nboxes,
|
||||
struct pipe_box *box)
|
||||
{
|
||||
struct xlib_drawable *xlib_drawable = (struct xlib_drawable *)context_private;
|
||||
xlib_sw_display(xlib_drawable, dt, box);
|
||||
xlib_sw_display(xlib_drawable, dt, nboxes, box);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -661,7 +661,7 @@ static void virgl_vtest_flush_frontbuffer(struct virgl_winsys *vws,
|
||||
level, true);
|
||||
|
||||
vtws->sws->displaytarget_display(vtws->sws, res->dt, winsys_drawable_handle,
|
||||
sub_box);
|
||||
!!sub_box, sub_box);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user