ilo: create the pipeline from the builder
authorChia-I Wu <olvaffe@gmail.com>
Mon, 22 Sep 2014 03:41:53 +0000 (11:41 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 22 Sep 2014 03:47:33 +0000 (11:47 +0800)
The pipeline needs just the builder to build commands.  It does not need CP.

src/gallium/drivers/ilo/ilo_3d.c
src/gallium/drivers/ilo/ilo_3d_pipeline.c
src/gallium/drivers/ilo/ilo_3d_pipeline.h
src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c

index 291ff1c102c9446fd89a356523dc8cec5c7d202c..3ac05ad45f76522f4962db4084469b5ded4683f7 100644 (file)
@@ -334,7 +334,7 @@ ilo_3d_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
 
    list_inithead(&hw3d->queries);
 
-   hw3d->pipeline = ilo_3d_pipeline_create(cp, dev);
+   hw3d->pipeline = ilo_3d_pipeline_create(&cp->builder);
    if (!hw3d->pipeline) {
       FREE(hw3d);
       return NULL;
index cf7ce0bd680246506e62a6bd899edcff60836ae3..9cceb84e7810fecba3515aa4e681c67c6effe8f3 100644 (file)
  *    Chia-I Wu <olv@lunarg.com>
  */
 
-#include "util/u_prim.h"
 #include "intel_winsys.h"
 
-#include "ilo_blitter.h"
-#include "ilo_cp.h"
-#include "ilo_state.h"
+#include "ilo_builder.h"
 #include "ilo_3d_pipeline_gen6.h"
 #include "ilo_3d_pipeline_gen7.h"
 #include "ilo_3d_pipeline.h"
@@ -64,7 +61,7 @@ static const struct sample_position sample_position_8x[8] = {
 };
 
 struct ilo_3d_pipeline *
-ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
+ilo_3d_pipeline_create(struct ilo_builder *builder)
 {
    struct ilo_3d_pipeline *p;
    int i;
@@ -73,9 +70,8 @@ ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
    if (!p)
       return NULL;
 
-   p->dev = dev;
-   p->cp = cp;
-   p->builder = &cp->builder;
+   p->dev = builder->dev;
+   p->builder = builder;
 
    switch (ilo_dev_gen(p->dev)) {
    case ILO_GEN(6):
@@ -94,7 +90,7 @@ ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev)
 
    p->invalidate_flags = ILO_3D_PIPELINE_INVALIDATE_ALL;
 
-   p->workaround_bo = intel_winsys_alloc_buffer(p->cp->winsys,
+   p->workaround_bo = intel_winsys_alloc_buffer(builder->winsys,
          "PIPE_CONTROL workaround", 4096, false);
    if (!p->workaround_bo) {
       ilo_warn("failed to allocate PIPE_CONTROL workaround bo\n");
index 8e074bcc4a051437ea290d684f41ffeb09c8119f..c2ebb2fe224806ae2e529be2c3451e5bb2800c45 100644 (file)
@@ -58,8 +58,6 @@ enum ilo_3d_pipeline_action {
  */
 struct ilo_3d_pipeline {
    const struct ilo_dev_info *dev;
-
-   struct ilo_cp *cp;
    struct ilo_builder *builder;
 
    uint32_t invalidate_flags;
@@ -136,7 +134,7 @@ struct ilo_3d_pipeline {
 };
 
 struct ilo_3d_pipeline *
-ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev);
+ilo_3d_pipeline_create(struct ilo_builder *builder);
 
 void
 ilo_3d_pipeline_destroy(struct ilo_3d_pipeline *pipeline);
index 856e9ecce383356f1777b97de29fe4dd16ea4c93..c68e4f264eb1b14b026dbb4694842d60b396ad2b 100644 (file)
@@ -34,7 +34,6 @@
 #include "ilo_builder_3d.h"
 #include "ilo_builder_mi.h"
 #include "ilo_builder_render.h"
-#include "ilo_cp.h"
 #include "ilo_query.h"
 #include "ilo_shader.h"
 #include "ilo_state.h"
index 9db1cedf69264c7926df182e662db8ea1a1f235a..d94570e36b6528b54f61ebe10141b1c28d15e135 100644 (file)
@@ -31,7 +31,6 @@
 #include "ilo_blitter.h"
 #include "ilo_builder_3d.h"
 #include "ilo_builder_render.h"
-#include "ilo_cp.h"
 #include "ilo_shader.h"
 #include "ilo_state.h"
 #include "ilo_3d_pipeline.h"