intel/fs: Drop the gl_program from fs_visitor
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 23 Aug 2019 20:33:24 +0000 (15:33 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Sun, 25 Aug 2019 06:02:52 +0000 (01:02 -0500)
It's not used by anything anymore now that so much lowering has been
moved into NIR.  Sadly, we still need on in brw_compile_gs() for
geometry shaders on Sandy Bridge.  Short of a lot of pointless work,
that one's probably not going away.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
15 files changed:
src/gallium/drivers/iris/iris_program.c
src/intel/blorp/blorp.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_visitor.cpp
src/intel/compiler/brw_shader.cpp
src/intel/compiler/brw_vec4.cpp
src/intel/compiler/brw_vec4_tcs.cpp
src/intel/compiler/test_fs_cmod_propagation.cpp
src/intel/compiler/test_fs_copy_propagation.cpp
src/intel/compiler/test_fs_saturate_propagation.cpp
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_wm.c

index 579055ea345fe7a4f654d923528b7ea84731c6d9..b1830fbdcbf209f537a04c1f6236cf5a61f90b9d 100644 (file)
@@ -1304,7 +1304,7 @@ iris_compile_tes(struct iris_context *ice,
    char *error_str = NULL;
    const unsigned *program =
       brw_compile_tes(compiler, &ice->dbg, mem_ctx, key, &input_vue_map,
-                      tes_prog_data, nir, NULL, -1, NULL, &error_str);
+                      tes_prog_data, nir, -1, NULL, &error_str);
    if (program == NULL) {
       dbg_printf("Failed to compile evaluation shader: %s\n", error_str);
       ralloc_free(mem_ctx);
@@ -1534,7 +1534,7 @@ iris_compile_fs(struct iris_context *ice,
    char *error_str = NULL;
    const unsigned *program =
       brw_compile_fs(compiler, &ice->dbg, mem_ctx, key, fs_prog_data,
-                     nir, NULL, -1, -1, -1, true, false, vue_map,
+                     nir, -1, -1, -1, true, false, vue_map,
                      NULL, &error_str);
    if (program == NULL) {
       dbg_printf("Failed to compile fragment shader: %s\n", error_str);
index 480107d2a34f91a1304804ea3a8d83ae24d32358..498457572dbfbbf6c52eaf7c5f9547734f050d7a 100644 (file)
@@ -205,7 +205,7 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx,
 
    const unsigned *program =
       brw_compile_fs(compiler, blorp->driver_ctx, mem_ctx, wm_key,
-                     wm_prog_data, nir, NULL, -1, -1, -1, false, use_repclear,
+                     wm_prog_data, nir, -1, -1, -1, false, use_repclear,
                      NULL, NULL, NULL);
 
    return program;
index 5eb9fc9940647184928b47d0244b768d48789729..340c8db566c2ba289ee4adc531970ee0e4d9e5cf 100644 (file)
@@ -1319,7 +1319,6 @@ brw_compile_tes(const struct brw_compiler *compiler, void *log_data,
                 const struct brw_vue_map *input_vue_map,
                 struct brw_tes_prog_data *prog_data,
                 struct nir_shader *shader,
-                struct gl_program *prog,
                 int shader_time_index,
                 struct brw_compile_stats *stats,
                 char **error_str);
@@ -1383,7 +1382,6 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
                const struct brw_wm_prog_key *key,
                struct brw_wm_prog_data *prog_data,
                struct nir_shader *shader,
-               struct gl_program *prog,
                int shader_time_index8,
                int shader_time_index16,
                int shader_time_index32,
index ebac22d690cb236ded71d2858fd24d9c466d2027..a234450887f7ff3cf82e60b7503f17202bb0d67a 100644 (file)
@@ -8029,7 +8029,6 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
                const struct brw_wm_prog_key *key,
                struct brw_wm_prog_data *prog_data,
                nir_shader *shader,
-               struct gl_program *prog,
                int shader_time_index8, int shader_time_index16,
                int shader_time_index32, bool allow_spilling,
                bool use_rep_send, struct brw_vue_map *vue_map,
@@ -8086,7 +8085,7 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
    cfg_t *simd8_cfg = NULL, *simd16_cfg = NULL, *simd32_cfg = NULL;
 
    fs_visitor v8(compiler, log_data, mem_ctx, &key->base,
-                 &prog_data->base, prog, shader, 8,
+                 &prog_data->base, shader, 8,
                  shader_time_index8);
    if (!v8.run_fs(allow_spilling, false /* do_rep_send */)) {
       if (error_str)
@@ -8103,7 +8102,7 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
        likely(!(INTEL_DEBUG & DEBUG_NO16) || use_rep_send)) {
       /* Try a SIMD16 compile */
       fs_visitor v16(compiler, log_data, mem_ctx, &key->base,
-                     &prog_data->base, prog, shader, 16,
+                     &prog_data->base, shader, 16,
                      shader_time_index16);
       v16.import_uniforms(&v8);
       if (!v16.run_fs(allow_spilling, use_rep_send)) {
@@ -8123,7 +8122,7 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
        unlikely(INTEL_DEBUG & DEBUG_DO32)) {
       /* Try a SIMD32 compile */
       fs_visitor v32(compiler, log_data, mem_ctx, &key->base,
-                     &prog_data->base, prog, shader, 32,
+                     &prog_data->base, shader, 32,
                      shader_time_index32);
       v32.import_uniforms(&v8);
       if (!v32.run_fs(allow_spilling, false)) {
@@ -8368,7 +8367,6 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
                                            src_shader, 8);
       v8 = new fs_visitor(compiler, log_data, mem_ctx, &key->base,
                           &prog_data->base,
-                          NULL, /* Never used in core profile */
                           nir8, 8, shader_time_index);
       if (!v8->run_cs(min_dispatch_width)) {
          fail_msg = v8->fail_msg;
@@ -8389,7 +8387,6 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
                                             src_shader, 16);
       v16 = new fs_visitor(compiler, log_data, mem_ctx, &key->base,
                            &prog_data->base,
-                           NULL, /* Never used in core profile */
                            nir16, 16, shader_time_index);
       if (v8)
          v16->import_uniforms(v8);
@@ -8423,7 +8420,6 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
                                             src_shader, 32);
       v32 = new fs_visitor(compiler, log_data, mem_ctx, &key->base,
                            &prog_data->base,
-                           NULL, /* Never used in core profile */
                            nir32, 32, shader_time_index);
       if (v8)
          v32->import_uniforms(v8);
index 14c736a4c8124d6c301270801adb8a7d9870ee5e..cce846908b0b07e8e5bc11edcbf6b45917ed3752 100644 (file)
@@ -69,7 +69,6 @@ public:
               void *mem_ctx,
               const brw_base_prog_key *key,
               struct brw_stage_prog_data *prog_data,
-              struct gl_program *prog,
               const nir_shader *shader,
               unsigned dispatch_width,
               int shader_time_index,
@@ -312,7 +311,6 @@ public:
    struct brw_gs_compile *gs_compile;
 
    struct brw_stage_prog_data *prog_data;
-   struct gl_program *prog;
 
    const struct brw_vue_map *input_vue_map;
 
index 273433f3e5e29cbb234b790aa5fb97d7755f7866..e8ff5568330ae7669bfa879a93770c1d6c89addf 100644 (file)
@@ -890,13 +890,12 @@ fs_visitor::fs_visitor(const struct brw_compiler *compiler, void *log_data,
                        void *mem_ctx,
                        const brw_base_prog_key *key,
                        struct brw_stage_prog_data *prog_data,
-                       struct gl_program *prog,
                        const nir_shader *shader,
                        unsigned dispatch_width,
                        int shader_time_index,
                        const struct brw_vue_map *input_vue_map)
    : backend_shader(compiler, log_data, mem_ctx, shader, prog_data),
-     key(key), gs_compile(NULL), prog_data(prog_data), prog(prog),
+     key(key), gs_compile(NULL), prog_data(prog_data),
      input_vue_map(input_vue_map),
      dispatch_width(dispatch_width),
      shader_time_index(shader_time_index),
@@ -914,7 +913,7 @@ fs_visitor::fs_visitor(const struct brw_compiler *compiler, void *log_data,
    : backend_shader(compiler, log_data, mem_ctx, shader,
                     &prog_data->base.base),
      key(&c->key.base), gs_compile(c),
-     prog_data(&prog_data->base.base), prog(NULL),
+     prog_data(&prog_data->base.base),
      dispatch_width(8),
      shader_time_index(shader_time_index),
      bld(fs_builder(this, dispatch_width).at_end())
index ba801c94eb28afc3dd28bd34fd5657ae513d5359..1a414cf9d124862d874c94afa34db5b440469fe4 100644 (file)
@@ -1233,7 +1233,6 @@ brw_compile_tes(const struct brw_compiler *compiler,
                 const struct brw_vue_map *input_vue_map,
                 struct brw_tes_prog_data *prog_data,
                 nir_shader *nir,
-                struct gl_program *prog,
                 int shader_time_index,
                 struct brw_compile_stats *stats,
                 char **error_str)
@@ -1324,7 +1323,7 @@ brw_compile_tes(const struct brw_compiler *compiler,
 
    if (is_scalar) {
       fs_visitor v(compiler, log_data, mem_ctx, &key->base,
-                   &prog_data->base.base, NULL, nir, 8,
+                   &prog_data->base.base, nir, 8,
                    shader_time_index, input_vue_map);
       if (!v.run_tes()) {
          if (error_str)
index 7309afc778e3c6f2369f5e7e55db2a6eba1a9add..9fa946ccdb480715b38c63a80927e58c6ffac561 100644 (file)
@@ -2964,7 +2964,6 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
 
       fs_visitor v(compiler, log_data, mem_ctx, &key->base,
                    &prog_data->base.base,
-                   NULL, /* prog; Only used for TEXTURE_RECTANGLE on gen < 8 */
                    shader, 8, shader_time_index);
       if (!v.run_vs()) {
          if (error_str)
index 7747208f1da7c84dcc6d9287b83c8ec382bf5393..9d6c4f326a447f2cc55caf5426b35aaf3133a420 100644 (file)
@@ -426,7 +426,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
 
    if (is_scalar) {
       fs_visitor v(compiler, log_data, mem_ctx, &key->base,
-                   &prog_data->base.base, NULL, nir, 8,
+                   &prog_data->base.base, nir, 8,
                    shader_time_index, &input_vue_map);
       if (!v.run_tcs()) {
          if (error_str)
index 218605000f4b0130650a129ab2f0409d78dfba28..d05c689719665642fbf9dc44d43de2392b6a39a3 100644 (file)
@@ -57,8 +57,7 @@ public:
                                struct brw_wm_prog_data *prog_data,
                                nir_shader *shader)
       : fs_visitor(compiler, NULL, NULL, NULL,
-                   &prog_data->base, (struct gl_program *) NULL,
-                   shader, 8, -1) {}
+                   &prog_data->base, shader, 8, -1) {}
 };
 
 
index 37736ec86f44cebf840078917bf4692b5cf77f47..fff85c2933b150556e749ccc37d97fba4a052ade 100644 (file)
@@ -47,8 +47,7 @@ public:
                                struct brw_wm_prog_data *prog_data,
                                nir_shader *shader)
       : fs_visitor(compiler, NULL, NULL, NULL,
-                   &prog_data->base, (struct gl_program *) NULL,
-                   shader, 8, -1) {}
+                   &prog_data->base, shader, 8, -1) {}
 };
 
 
index c01ff2e66ebe7bcf51fd13aba9780352e0ac3341..e0f96abb10d5add436800e15615d44ff0384fa9b 100644 (file)
@@ -47,8 +47,7 @@ public:
                                    struct brw_wm_prog_data *prog_data,
                                    nir_shader *shader)
       : fs_visitor(compiler, NULL, NULL, NULL,
-                   &prog_data->base, (struct gl_program *) NULL,
-                   shader, 16, -1) {}
+                   &prog_data->base, shader, 16, -1) {}
 };
 
 
index 6d705b88e0821b615c97297f8bc5973a8bd14f6d..05dc54960ef24bb4ab99e845847810114f1bb5af 100644 (file)
@@ -878,7 +878,7 @@ anv_pipeline_compile_tes(const struct brw_compiler *compiler,
                                      &tes_stage->key.tes,
                                      &tcs_stage->prog_data.tcs.base.vue_map,
                                      &tes_stage->prog_data.tes,
-                                     tes_stage->nir, NULL, -1,
+                                     tes_stage->nir, -1,
                                      tes_stage->stats, NULL);
 }
 
@@ -1043,7 +1043,7 @@ anv_pipeline_compile_fs(const struct brw_compiler *compiler,
    fs_stage->code = brw_compile_fs(compiler, device, mem_ctx,
                                    &fs_stage->key.wm,
                                    &fs_stage->prog_data.wm,
-                                   fs_stage->nir, NULL, -1, -1, -1,
+                                   fs_stage->nir, -1, -1, -1,
                                    true, false, NULL,
                                    fs_stage->stats, NULL);
 
index 6980da3deaf1d1b6c5d60de967376d094c3c1ce2..b817fcf85e6c806e78e36d4546a82904443e4e46 100644 (file)
@@ -76,7 +76,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
    char *error_str;
    const unsigned *program =
       brw_compile_tes(compiler, brw, mem_ctx, key, &input_vue_map, &prog_data,
-                      nir, &tep->program, st_index, NULL, &error_str);
+                      nir, st_index, NULL, &error_str);
    if (program == NULL) {
       tep->program.sh.data->LinkStatus = LINKING_FAILURE;
       ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
index 32ca6fd886c68a2ee7c2cfac71e620045f430209..6f5c144eaa975598b36bb2db90207a8866c8185b 100644 (file)
@@ -122,7 +122,7 @@ brw_codegen_wm_prog(struct brw_context *brw,
    char *error_str = NULL;
    program = brw_compile_fs(brw->screen->compiler, brw, mem_ctx,
                             key, &prog_data, nir,
-                            &fp->program, st_index8, st_index16, st_index32,
+                            st_index8, st_index16, st_index32,
                             true, false, vue_map,
                             NULL, &error_str);