[gtk+/wip/otte/shader: 70/151] xxx: Change the clip shader do not use #f
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/shader: 70/151] xxx: Change the clip shader do not use #f
- Date: Mon, 23 Oct 2017 01:25:08 +0000 (UTC)
commit 983e2c4b310d83af3563e17792c193e5c04e37e0
Author: Benjamin Otte <otte redhat com>
Date: Mon Oct 2 16:59:32 2017 +0200
xxx: Change the clip shader do not use #f
Use #ifdef instead.
gsk/resources/vulkan/clip.frag.glsl | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gsk/resources/vulkan/clip.frag.glsl b/gsk/resources/vulkan/clip.frag.glsl
index 472dc6f..1717e99 100644
--- a/gsk/resources/vulkan/clip.frag.glsl
+++ b/gsk/resources/vulkan/clip.frag.glsl
@@ -11,13 +11,17 @@ vec4 clip(vec2 pos, vec4 color)
return color * rounded_rect_coverage (r, pos);
}
-#elif defined(CLIP_RECT)
+#else
+#ifdef CLIP_RECT
+//#elif defined(CLIP_RECT)
vec4 clip(vec2 pos, vec4 color)
{
/* clipped in vertex shader already */
return color;
}
-#elif defined(CLIP_NONE)
+#else
+#ifdef CLIP_NONE
+//#elif defined(CLIP_NONE)
vec4 clip(vec2 pos, vec4 color)
{
return color;
@@ -25,5 +29,7 @@ vec4 clip(vec2 pos, vec4 color)
#else
#error "No clipping define given. Need CLIP_NONE, CLIP_RECT or CLIP_ROUNDED_RECT"
#endif
+#endif
+#endif
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]