aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-10-06 22:50:34 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:09 -0800
commit6fbb6ba290bed57481a78b9e55de1da1d1d392af (patch)
tree227985bcca805fc05ed7b95dea6d14090a938bda /src/gallium
parent87351b8dfe29ee012a48b41cf8a1a00bf34e8ad3 (diff)
iris: pipe to scs -> iris_pipe.h
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_pipe.h17
-rw-r--r--src/gallium/drivers/iris/iris_state.c17
2 files changed, 17 insertions, 17 deletions
diff --git a/src/gallium/drivers/iris/iris_pipe.h b/src/gallium/drivers/iris/iris_pipe.h
index 06ff938372e..1cb0a76af9a 100644
--- a/src/gallium/drivers/iris/iris_pipe.h
+++ b/src/gallium/drivers/iris/iris_pipe.h
@@ -40,4 +40,21 @@ stage_from_pipe(enum pipe_shader_type pstage)
return stages[pstage];
}
+/**
+ * Convert an swizzle enumeration (i.e. PIPE_SWIZZLE_X) to one of the HW's
+ * "Shader Channel Select" enumerations (i.e. SCS_RED). The mappings are
+ *
+ * SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_ZERO, SWIZZLE_ONE
+ * 0 1 2 3 4 5
+ * 4 5 6 7 0 1
+ * SCS_RED, SCS_GREEN, SCS_BLUE, SCS_ALPHA, SCS_ZERO, SCS_ONE
+ *
+ * which is simply adding 4 then modding by 8 (or anding with 7).
+ */
+static inline enum isl_channel_select
+pipe_swizzle_to_isl_channel(enum pipe_swizzle swizzle)
+{
+ return (swizzle + 4) & 7;
+}
+
#endif
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 525bdf6a55e..86aeccd8c81 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1290,23 +1290,6 @@ iris_bind_sampler_states(struct pipe_context *ctx,
}
/**
- * Convert an swizzle enumeration (i.e. PIPE_SWIZZLE_X) to one of the HW's
- * "Shader Channel Select" enumerations (i.e. SCS_RED). The mappings are
- *
- * SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_ZERO, SWIZZLE_ONE
- * 0 1 2 3 4 5
- * 4 5 6 7 0 1
- * SCS_RED, SCS_GREEN, SCS_BLUE, SCS_ALPHA, SCS_ZERO, SCS_ONE
- *
- * which is simply adding 4 then modding by 8 (or anding with 7).
- */
-static enum isl_channel_select
-pipe_swizzle_to_isl_channel(enum pipe_swizzle swizzle)
-{
- return (swizzle + 4) & 7;
-}
-
-/**
* The pipe->create_sampler_view() driver hook.
*/
static struct pipe_sampler_view *