<div dir="ltr"><div>Reviewed-by: Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org">gurchetansingh@chromium.org</a>></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, May 21, 2018 at 12:37 AM Gert Wollny <<a href="mailto:gert.wollny@collabora.com">gert.wollny@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Donnerstag, den 17.05.2018, 12:33 +0200 schrieb Gert Wollny:<br>
> The driver must support at least one of<br>
> <br>
> PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT<br>
> PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT<br>
> <br>
> and one of<br>
> <br>
> PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER<br>
> PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER<br>
> <br>
> otherwise glsl_to_tgsi will fire an assert.<br>
> <br>
> ORIGIN_UPPER_LEFT is the default convention, and is supported by<br>
> all mesa drivers, hence it seems reasonable to always report the caps<br>
> to be enabled. On gles ORIGIN_LOWER_LEFT is generally not supported,<br>
> so we rely on the caps reported by the host that depend on whether we<br>
> run on an GL or an EGL host.<br>
> <br>
> For PIXEL_CENTER it is completely host driver dependend on what is<br>
> supported, and since we do not report the actual host driver<br>
> capabilities<br>
> it is best to mark both as supported, this is how it works for a GL<br>
> host too.<br>
> <br>
> Fixes:<br>
> dEQP-GLES3.functional.shaders.builtin_variable.fragcoord_xyz<br>
> dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_1<br>
> dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_2<br>
> <br>
> Signed-off-by: Gert Wollny <<a href="mailto:gert.wollny@collabora.com" target="_blank">gert.wollny@collabora.com</a>><br>
> ---<br>
> When I return 1 for PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT too,<br>
> the test fail on an r600g gle host. Likewise, when I disable one of<br>
> the two PIXEL_CENTER caps. <br>
> <br>
> However, I send this as an RFC, because there are some of the<br>
> *texture* tests that flip: some start to pass with this patch and<br>
> some start to fail, in total 16 test are fixed with this patch and 15<br>
> regress on Intel. I have not yet established whether these tests are<br>
> actually unstable.<br>
<br>
After quite some testing I've come to the conclusion that the tests<br>
that flip between Pass and Fail are tests that are generally unstable<br>
when run inside Qemu, so it should be save to apply it. <br>
<br>
Best, <br>
Gert <br>
<br>
> <br>
> thanks for any comments.<br>
> Gert<br>
> <br>
> src/gallium/drivers/virgl/virgl_screen.c | 3 ++-<br>
> 1 file changed, 2 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/src/gallium/drivers/virgl/virgl_screen.c<br>
> b/src/gallium/drivers/virgl/virgl_screen.c<br>
> index 1ca9e85de7..f4fdc61b14 100644<br>
> --- a/src/gallium/drivers/virgl/virgl_screen.c<br>
> +++ b/src/gallium/drivers/virgl/virgl_screen.c<br>
> @@ -88,9 +88,10 @@ virgl_get_param(struct pipe_screen *screen, enum<br>
> pipe_cap param)<br>
> case PIPE_CAP_INDEP_BLEND_FUNC:<br>
> return vscreen->caps.caps.v1.bset.indep_blend_func;<br>
> case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:<br>
> - case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:<br>
> case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:<br>
> case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:<br>
> + return 1;<br>
> + case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:<br>
> return vscreen->caps.caps.v1.bset.fragment_coord_conventions;<br>
> case PIPE_CAP_DEPTH_CLIP_DISABLE:<br>
> return vscreen->caps.caps.v1.bset.depth_clip_disable;<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>