*
* Design & limitations:
* - The shader cache is per screen (= per process), never saved to
- * disk, and skips redundant shader compilations from TGSI to bytecode.
+ * disk, and skips redundant shader compilations from NIR to bytecode.
* - It can only be used with one-variant-per-shader support, in which
* case only the main (typically middle) part of shaders is cached.
* - Only VS, TCS, TES, PS are cached, out of which only the hw VS
return base_addr;
}
-/* This is a generic helper that can be shared by the NIR and TGSI backends */
static LLVMValueRef get_tcs_tes_buffer_address_from_generic_indices(
struct si_shader_context *ctx,
LLVMValueRef vertex_index,
/* TODO: This will generate rather ordinary llvm code, although it
* should be easy for the optimiser to fix up. In future we might want
- * to refactor buffer_load(), but for now this maximises code sharing
- * between the NIR and TGSI backends.
+ * to refactor buffer_load().
*/
LLVMValueRef value[4];
for (unsigned i = 0; i < num_components; i++) {
if (shader->key.part.tcs.epilog.prim_mode == PIPE_PRIM_LINES) {
/* For isolines, the hardware expects tess factors in the
- * reverse order from what GLSL / TGSI specify.
+ * reverse order from what NIR specifies.
*/
LLVMValueRef tmp = out[0];
out[0] = out[1];
struct nir_shader *nir = get_nir_shader(sel, &free_nir);
int r = -1;
- /* Dump TGSI code before doing TGSI->LLVM conversion in case the
+ /* Dump NIR before doing NIR->LLVM conversion in case the
* conversion fails. */
if (si_can_dump_shader(sscreen, sel->type) &&
!(sscreen->debug_flags & DBG(NO_NIR))) {
if (!mainp)
return false;
- /* Copy the compiled TGSI shader data over. */
+ /* Copy the compiled shader data over. */
shader->is_binary_shared = true;
shader->binary = mainp->binary;
shader->config = mainp->config;
};
/* A shader selector is a gallium CSO and contains shader variants and
- * binaries for one TGSI program. This can be shared by multiple contexts.
+ * binaries for one NIR program. This can be shared by multiple contexts.
*/
struct si_shader_selector {
struct pipe_reference reference;
struct si_shader *first_variant; /* immutable after the first variant */
struct si_shader *last_variant; /* mutable */
- /* The compiled TGSI shader expecting a prolog and/or epilog (not
- * uploaded to a buffer).
+ /* The compiled NIR shader without a prolog and/or epilog (not
+ * uploaded to a buffer object).
*/
struct si_shader *main_shader_part;
struct si_shader *main_shader_part_ls; /* as_ls is set in the key */
ctx->i1true = LLVMConstInt(ctx->i1, 1, 0);
}
-/* Set the context to a certain TGSI shader. Can be called repeatedly
+/* Set the context to a certain shader. Can be called repeatedly
* to change the shader. */
void si_llvm_context_set_ir(struct si_shader_context *ctx,
struct si_shader *shader)