i965/nir: Do lower_io late for fragment shaders
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 17 Feb 2016 21:23:45 +0000 (13:23 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 Feb 2016 02:04:39 +0000 (18:04 -0800)
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_nir.c
src/vulkan/anv_pipeline.c

index 7e161e8bb48381f4bbbf15a18a12204eff7ce1b9..bb22cfa5fab7c0da48965ff8f46f58a300b0c589 100644 (file)
@@ -5606,6 +5606,8 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
    nir_shader *shader = nir_shader_clone(mem_ctx, src_shader);
    shader = brw_nir_apply_sampler_key(shader, compiler->devinfo, &key->tex,
                                       true);
+   shader = brw_nir_lower_io(shader, compiler->devinfo, true,
+                             false, NULL);
    shader = brw_postprocess_nir(shader, compiler->devinfo, true);
 
    /* key->alpha_test_func means simulating alpha testing via discards,
index 44446694b4b524b402a22ac9b9fa424f7a1fa45a..e9351a5556aefa8b1ba5b106ae5792a520d27596 100644 (file)
@@ -637,7 +637,8 @@ brw_create_nir(struct brw_context *brw,
 
    if (nir->stage != MESA_SHADER_VERTEX &&
        nir->stage != MESA_SHADER_TESS_CTRL &&
-       nir->stage != MESA_SHADER_TESS_EVAL) {
+       nir->stage != MESA_SHADER_TESS_EVAL &&
+       nir->stage != MESA_SHADER_FRAGMENT) {
       nir = brw_nir_lower_io(nir, devinfo, is_scalar, false, NULL);
    }
 
index 21df3e081a33b3372ae069d98273e8bb3843277f..e6cc8faf4fc909c50f824a90501c0c9ce820aab2 100644 (file)
@@ -390,7 +390,8 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
    /* Finish the optimization and compilation process */
    if (nir->stage != MESA_SHADER_VERTEX &&
        nir->stage != MESA_SHADER_TESS_CTRL &&
-       nir->stage != MESA_SHADER_TESS_EVAL) {
+       nir->stage != MESA_SHADER_TESS_EVAL &&
+       nir->stage != MESA_SHADER_FRAGMENT) {
       nir = brw_nir_lower_io(nir, &pipeline->device->info,
                              compiler->scalar_stage[stage], false, NULL);
    }