brw_create_nir(struct brw_context *brw,
const struct gl_shader_program *shader_prog,
const struct gl_program *prog,
- gl_shader_stage stage)
+ gl_shader_stage stage,
+ bool is_scalar)
{
struct gl_context *ctx = &brw->ctx;
const nir_shader_compiler_options *options =
nir_shader *brw_create_nir(struct brw_context *brw,
const struct gl_shader_program *shader_prog,
const struct gl_program *prog,
- gl_shader_stage stage);
+ gl_shader_stage stage,
+ bool is_scalar);
#ifdef __cplusplus
}
brw_add_texrect_params(prog);
if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT].NirOptions) {
- prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_FRAGMENT);
+ prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_FRAGMENT, true);
}
brw_fs_precompile(ctx, NULL, prog);
brw_add_texrect_params(prog);
if (ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].NirOptions) {
- prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_VERTEX);
+ prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_VERTEX,
+ brw->intelScreen->compiler->scalar_vs);
}
brw_vs_precompile(ctx, NULL, prog);
brw_add_texrect_params(prog);
- if (options->NirOptions)
- prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) stage);
+ if (options->NirOptions) {
+ prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) stage,
+ is_scalar_shader_stage(brw, stage));
+ }
_mesa_reference_program(ctx, &prog, NULL);
}
*/
assert(vp->Base.Id == 0 && prog == NULL);
vp->Base.nir =
- brw_create_nir(brw, NULL, &vp->Base, MESA_SHADER_VERTEX);
+ brw_create_nir(brw, NULL, &vp->Base, MESA_SHADER_VERTEX, true);
}
prog_data->base.dispatch_mode = DISPATCH_MODE_SIMD8;