summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-26 10:43:15 +0300
committerTopi Pohjolainen <[email protected]>2017-06-27 10:20:35 +0300
commitb3bf453686236661522a59441f5fdff4753b3089 (patch)
tree09772f45199792800ba9f195748b8979e994b309 /src/mesa
parentfbcc9555c50aa0b51b7339b9b8aa314b5aa7dc25 (diff)
i965: Separate gen < 8 and gen >= 8 paths explicitly in wrap_mode()
Makes coverity happier. Fix indentation in gen >= 8 block while at it. CID: 1413020 Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/genX_state_upload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 3f8a7265db9..d65b4688638 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -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: