i965: Separate gen < 8 and gen >= 8 paths explicitly in wrap_mode()
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 26 Jun 2017 07:43:15 +0000 (10:43 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 27 Jun 2017 07:20:35 +0000 (10:20 +0300)
Makes coverity happier.

Fix indentation in gen >= 8 block while at it.

CID: 1413020
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/genX_state_upload.c

index 3f8a7265db9b052377535a199607dab27e5b5d6f..d65b46886388947425ad008373909ef24f252bf6 100644 (file)
@@ -4455,9 +4455,8 @@ translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest)
        *
        * Gen8+ supports this natively.
        */
-         return TCM_HALF_BORDER;
-#endif
-
+      return TCM_HALF_BORDER;
+#else
       /* 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
@@ -4468,6 +4467,7 @@ translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest)
          return TCM_CLAMP;
       else
          return TCM_CLAMP_BORDER;
+#endif
    case GL_CLAMP_TO_EDGE:
       return TCM_CLAMP;
    case GL_CLAMP_TO_BORDER: