- * color. The fragment shader will clamp the coordinates, and
- * we set clamp_border here, which gets the result desired. We
- * just use clamp(_to_edge) for nearest, because for nearest
+ * color.
+ *
+ * Gen8+ supports this natively.
+ */
+ if (brw->gen >= 8)
+ return GEN8_TEXCOORDMODE_HALF_BORDER;
+
+ /* On Gen4-7.5, we clamp the coordinates in the fragment shader
+ * and set clamp_border here, which gets the result desired.
+ * We just use clamp(_to_edge) for nearest, because for nearest