llvmpipe/nir: handle texcoord requirements
authorDave Airlie <airlied@redhat.com>
Fri, 6 Dec 2019 04:16:52 +0000 (14:16 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 11 Dec 2019 23:16:24 +0000 (09:16 +1000)
Switch to using texcoord intrinsic support.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_fs.c
src/gallium/auxiliary/draw/draw_gs.c
src/gallium/auxiliary/draw/draw_vs_llvm.c
src/gallium/auxiliary/nir/nir_draw_helpers.c
src/gallium/drivers/llvmpipe/lp_state_fs.c

index e3bd25193dca842fb2e3a2e30fc51fa748720c59..e0ca7e4076012ab04001f5a45f366348704a8a2a 100644 (file)
@@ -51,7 +51,7 @@ draw_create_fragment_shader(struct draw_context *draw,
       if (shader->type == PIPE_SHADER_IR_TGSI)
          tgsi_scan_shader(shader->tokens, &dfs->info);
       else
-         nir_tgsi_scan_shader(shader->ir.nir, &dfs->info, false);
+         nir_tgsi_scan_shader(shader->ir.nir, &dfs->info, true);
    }
 
    return dfs;
index 1e5d3a86ea01acd02823492a551f73e1cca219f9..2d0a4773cbca262d987a1c95add007bae94d4fb9 100644 (file)
@@ -803,7 +803,7 @@ draw_create_geometry_shader(struct draw_context *draw,
 
       tgsi_scan_shader(state->tokens, &gs->info);
    } else
-      nir_tgsi_scan_shader(state->ir.nir, &gs->info, false);
+      nir_tgsi_scan_shader(state->ir.nir, &gs->info, true);
 
    /* setup the defaults */
    gs->max_out_prims = 0;
index c8ebe04efe18ee4cfac8800d482e2d9f7adfdb7a..e45fa68d5d69f45e4ee33c07aa5587b99a49fd1e 100644 (file)
@@ -93,7 +93,7 @@ draw_create_vs_llvm(struct draw_context *draw,
    /* due to some bugs in the feedback state tracker we have to check
       for ir.nir & PIPE_SHADER_IR_NIR here. */
    if (state->ir.nir && state->type == PIPE_SHADER_IR_NIR)
-      nir_tgsi_scan_shader(state->ir.nir, &vs->base.info, false);
+      nir_tgsi_scan_shader(state->ir.nir, &vs->base.info, true);
    else {
       /* we make a private copy of the tokens */
       vs->base.state.tokens = tgsi_dup_tokens(state->tokens);
index 036ce84938e319b17bdee9d96580d7ca207d7ac3..7a6936d63d7b6189b38053d69d404fe7eaed33dc 100644 (file)
@@ -237,7 +237,7 @@ nir_lower_aaline_fs(struct nir_shader *shader, int *varying)
      line_width->data.driver_location = highest_drv_location + 1;
    }
    shader->num_inputs++;
-   *varying = tgsi_get_generic_gl_varying_index(line_width->data.location, false);
+   *varying = tgsi_get_generic_gl_varying_index(line_width->data.location, true);
    state.line_width_input = line_width;
 
    nir_foreach_function(function, shader) {
@@ -361,7 +361,7 @@ nir_lower_aapoint_fs(struct nir_shader *shader, int *varying)
    aapoint_input->data.driver_location = highest_drv_location + 1;
 
    shader->num_inputs++;
-   *varying = tgsi_get_generic_gl_varying_index(aapoint_input->data.location, false);
+   *varying = tgsi_get_generic_gl_varying_index(aapoint_input->data.location, true);
    state.input = aapoint_input;
 
    nir_foreach_function(function, shader) {
index 75971f36bb2df4c6c5d179b29adbab2672562018..846cdd69ae92478149f44e37493d26482e10d8c9 100644 (file)
@@ -2987,7 +2987,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
       shader->base.tokens = tgsi_dup_tokens(templ->tokens);
    } else {
       shader->base.ir.nir = templ->ir.nir;
-      nir_tgsi_scan_shader(templ->ir.nir, &shader->info.base, false);
+      nir_tgsi_scan_shader(templ->ir.nir, &shader->info.base, true);
    }
 
    shader->draw_data = draw_create_fragment_shader(llvmpipe->draw, templ);