i965: return PASSTHRU surface types also on gen7
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 15 Apr 2016 17:08:04 +0000 (19:08 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 12 Jan 2017 11:56:12 +0000 (12:56 +0100)
Although gen7 doesn't include surface types as a valid conversion format,
we return it, as it reflects what we want to achieve, even if we need
to workaround it on gen < 8.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_draw_upload.c

index b7527f2cd9bda9edbd7efdcb3b867a8c7c4a4de4..79eb634fc450f91434665957f61956424ec42fbf 100644 (file)
@@ -231,9 +231,13 @@ double_types(struct brw_context *brw,
     * 64-bit components are stored in the URB without any conversion."
     * Also included on BDW PRM, Volume 7, page 470, table "Source Element
     * Formats Supported in VF Unit"
-    * Previous PRMs don't include those references.
+    *
+    * Previous PRMs don't include those references, so for gen7 we can't use
+    * PASSTHRU formats directly. But in any case, we prefer to return passthru
+    * even in that case, because that reflects what we want to achieve, even
+    * if we would need to workaround on gen < 8.
     */
-   return (brw->gen >= 8 && doubles
+   return (doubles
            ? double_types_passthru[size]
            : double_types_float[size]);
 }