summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_gpe.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-06-21 11:36:11 +0800
committerChia-I Wu <[email protected]>2013-06-25 13:18:08 +0800
commit68522bf36ce13f7be7aa0dbd9345f287053ff5c2 (patch)
tree4d1b275f2a272dbbcc9dc386a79b5a85aad4111c /src/gallium/drivers/ilo/ilo_gpe.h
parent639a2cddc6b95a287337f4ec1f18d714cb7e6baa (diff)
ilo: use ilo_shader_cso for FS
Add ilo_gpe_init_fs_cso() to construct 3DSTATE_PS and shader part of 3DSTATE_WM once and early for fragment shaders.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h
index f999aaf90ab..5e313abd386 100644
--- a/src/gallium/drivers/ilo/ilo_gpe.h
+++ b/src/gallium/drivers/ilo/ilo_gpe.h
@@ -484,4 +484,27 @@ ilo_gpe_init_gs_cso(const struct ilo_dev_info *dev,
}
}
+void
+ilo_gpe_init_fs_cso_gen6(const struct ilo_dev_info *dev,
+ const struct ilo_shader_state *fs,
+ struct ilo_shader_cso *cso);
+
+void
+ilo_gpe_init_fs_cso_gen7(const struct ilo_dev_info *dev,
+ const struct ilo_shader_state *fs,
+ struct ilo_shader_cso *cso);
+
+static inline void
+ilo_gpe_init_fs_cso(const struct ilo_dev_info *dev,
+ const struct ilo_shader_state *fs,
+ struct ilo_shader_cso *cso)
+{
+ if (dev->gen >= ILO_GEN(7)) {
+ ilo_gpe_init_fs_cso_gen7(dev, fs, cso);
+ }
+ else {
+ ilo_gpe_init_fs_cso_gen6(dev, fs, cso);
+ }
+}
+
#endif /* ILO_GPE_H */