Re: [Mesa-dev] [PATCH 21/64] isl/state: Set the IntegerSurfaceFormat bit on Haswell

2016-06-16 Thread Jason Ekstrand
On Thu, Jun 16, 2016 at 11:26 AM, Chad Versace 
wrote:

> On Sat 11 Jun 2016, Jason Ekstrand wrote:
> > This fixes 688 Vulkan CTS tests on Haswell.
>
> Whoo! Bugfixes!
>
> The PRM states that, on HSW, you also need to program
> SAMPLER_BORDER_COLOR_STATE correctly for integer formats. I suspect that
> the CTS tests may be passing by luck.
>
> See this encouraging comment in brw_sampler_state.c:
>
>   /* Haswell's integer border color support is completely insane:
>* SAMPLER_BORDER_COLOR_STATE is 20 DWords.  The first four are
>* for float colors.  The next 12 DWords are MBZ and only exist to
>* pad it out to a 64 byte cacheline boundary.  DWords 16-19 then
>* contain integer colors; these are only used if SURFACE_STATE
>* has the "Integer Surface Format" bit set.  Even then, the
>* arrangement of the RGBA data devolves into madness.
>*/
>

Oh, I'm well aware of the insanity there!  I reviewed those patches.


>
> Anyway, this patch is
> Reviewed-by: Chad Versace 
> and please add a TODO somewhere for SAMPLER_BORDER_COLOR_STATE.
>

I'm not quite sure where to put that TODO...  Sadly, integer border color
will probably never work properly on Haswell :-(
--Jason
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 21/64] isl/state: Set the IntegerSurfaceFormat bit on Haswell

2016-06-16 Thread Chad Versace
On Sat 11 Jun 2016, Jason Ekstrand wrote:
> This fixes 688 Vulkan CTS tests on Haswell.

Whoo! Bugfixes!

The PRM states that, on HSW, you also need to program
SAMPLER_BORDER_COLOR_STATE correctly for integer formats. I suspect that
the CTS tests may be passing by luck.

See this encouraging comment in brw_sampler_state.c:

  /* Haswell's integer border color support is completely insane:
   * SAMPLER_BORDER_COLOR_STATE is 20 DWords.  The first four are
   * for float colors.  The next 12 DWords are MBZ and only exist to
   * pad it out to a 64 byte cacheline boundary.  DWords 16-19 then
   * contain integer colors; these are only used if SURFACE_STATE
   * has the "Integer Surface Format" bit set.  Even then, the
   * arrangement of the RGBA data devolves into madness.
   */

Anyway, this patch is
Reviewed-by: Chad Versace 
and please add a TODO somewhere for SAMPLER_BORDER_COLOR_STATE.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 21/64] isl/state: Set the IntegerSurfaceFormat bit on Haswell

2016-06-11 Thread Jason Ekstrand
This fixes 688 Vulkan CTS tests on Haswell.
---
 src/intel/isl/isl_surface_state.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/intel/isl/isl_surface_state.c 
b/src/intel/isl/isl_surface_state.c
index 35902e6..b16bcbf 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -202,6 +202,10 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, 
void *state,
   s.SurfaceFormat = info->view->format;
}
 
+#if GEN_IS_HASWELL
+   s.IntegerSurfaceFormat = isl_format_has_int_channel(s.SurfaceFormat);
+#endif
+
s.Width = info->surf->logical_level0_px.width - 1;
s.Height = info->surf->logical_level0_px.height - 1;
 
-- 
2.5.0.400.gff86faf

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev