<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 24/01/17 17:40, Jason Ekstrand
wrote:<br>
</div>
<blockquote
cite="mid:CAOFGe941Xn+q9D=o_dc68MjWzMcYeqb_w6EfBrvVp2VYBDUaTw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Jan 24, 2017 at 12:49 AM,
Iago Toral <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">On Mon, 2017-01-23 at 14:12 -0800, Jason
Ekstrand wrote:<br>
> As per VK_KHR_maintenance1, setting a negative
height in the viewport<br>
> can be used to get flipped coordinates. This is,
aparently, very<br>
> useful<br>
> when porting D3D apps to Vulkan. All we need to do
to support this<br>
> is<br>
> to make sure we actually set the min and max
correctly.<br>
> ---<br>
> src/intel/vulkan/gen8_cmd_<wbr>buffer.c | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/intel/vulkan/gen8_cmd_<wbr>buffer.c<br>
> b/src/intel/vulkan/gen8_cmd_<wbr>buffer.c<br>
> index f22037b..ab68872 100644<br>
> --- a/src/intel/vulkan/gen8_cmd_<wbr>buffer.c<br>
> +++ b/src/intel/vulkan/gen8_cmd_<wbr>buffer.c<br>
> @@ -59,8 +59,8 @@ gen8_cmd_buffer_emit_viewport(<wbr>struct
anv_cmd_buffer<br>
> *cmd_buffer)<br>
> .YMaxClipGuardband = 1.0f,<br>
> .XMinViewPort = vp->x,<br>
> .XMaxViewPort = vp->x + vp->width -
1,<br>
> - .YMinViewPort = vp->y,<br>
> - .YMaxViewPort = vp->y + vp->height
- 1,<br>
> + .YMinViewPort = MIN2(vp->y, vp->y +
vp->height),<br>
> + .YMaxViewPort = MAX2(vp->y, vp->y +
vp->height) - 1,<br>
> };<br>
<br>
</span>If we have y = 0 and height = -100, shouldn't we
use YMinVP = -99 and<br>
YMaxVP = 0 instead of (-100, -1)?<br>
</blockquote>
<div><br>
</div>
<div>No, I think we still want -100, -1. In the case
mentioned, the Y region, in floating-point, is [-100, 0].
However, it appears that, even though it's float, we're
expected to provide max-1 in the max fields.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Thanks for the explanation!<br>
<br>
Reviewed-by: Lionel Landwerlin <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a><br>
<br>
<blockquote
cite="mid:CAOFGe941Xn+q9D=o_dc68MjWzMcYeqb_w6EfBrvVp2VYBDUaTw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">
> GENX(SF_CLIP_VIEWPORT_<wbr>pack)(NULL,
sf_clip_state.map + i * 64,<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mesa-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>