aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen8_cmd_buffer.c
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2016-11-28 17:15:14 -0800
committerKristian H. Kristensen <[email protected]>2016-11-29 22:02:49 -0800
commit3b6b6f6463019f4c765d8e8a5b37a530f489bf5a (patch)
tree7f780546b409efbb230d254d02d8f55e94169743 /src/intel/vulkan/gen8_cmd_buffer.c
parent908febcf214f0db8ec29f559644a2c26007235e9 (diff)
anv: Emit cherryview SF state without including gen9_pack.h
Cleaner this way and we avoid including gen9_pack.h when we compile with gen8_pack.h. We also avoid the if (cherryview) condition for non-gen8 gens that don't need it. Signed-off-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen8_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/gen8_cmd_buffer.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/intel/vulkan/gen8_cmd_buffer.c b/src/intel/vulkan/gen8_cmd_buffer.c
index 6578c22a1ea..3e4aa9bc623 100644
--- a/src/intel/vulkan/gen8_cmd_buffer.c
+++ b/src/intel/vulkan/gen8_cmd_buffer.c
@@ -120,30 +120,40 @@ __emit_genx_sf_state(struct anv_cmd_buffer *cmd_buffer)
cmd_buffer->state.pipeline->gen8.sf);
}
-#include "genxml/gen9_pack.h"
-static void
-__emit_gen9_sf_state(struct anv_cmd_buffer *cmd_buffer)
+void
+gen9_emit_sf_state(struct anv_cmd_buffer *cmd_buffer);
+
+#if GEN_GEN == 9
+
+void
+gen9_emit_sf_state(struct anv_cmd_buffer *cmd_buffer)
{
- uint32_t sf_dw[GENX(3DSTATE_SF_length)];
- struct GEN9_3DSTATE_SF sf = {
- GEN9_3DSTATE_SF_header,
- .LineWidth = cmd_buffer->state.dynamic.line_width,
- };
- GEN9_3DSTATE_SF_pack(NULL, sf_dw, &sf);
- /* FIXME: gen9.fs */
- anv_batch_emit_merge(&cmd_buffer->batch, sf_dw,
- cmd_buffer->state.pipeline->gen8.sf);
+ __emit_genx_sf_state(cmd_buffer);
}
+#endif
+
+#if GEN_GEN == 8
+
static void
__emit_sf_state(struct anv_cmd_buffer *cmd_buffer)
{
if (cmd_buffer->device->info.is_cherryview)
- __emit_gen9_sf_state(cmd_buffer);
+ gen9_emit_sf_state(cmd_buffer);
else
__emit_genx_sf_state(cmd_buffer);
}
+#else
+
+static void
+__emit_sf_state(struct anv_cmd_buffer *cmd_buffer)
+{
+ __emit_genx_sf_state(cmd_buffer);
+}
+
+#endif
+
void
genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
{