Lines Matching defs:index
148 LLVMValueRef ac_llvm_extract_elem(struct ac_llvm_context *ac, LLVMValueRef value, int index)
151 assert(index == 0);
155 return LLVMBuildExtractElement(ac->builder, value, LLVMConstInt(ac->i32, index, false), "");
572 LLVMValueRef index = LLVMConstInt(ctx->i32, i - component, false);
573 vec = LLVMBuildInsertElement(ctx->builder, vec, value, index, "");
596 LLVMValueRef index = LLVMConstInt(ctx->i32, i, false);
597 vec = LLVMBuildInsertElement(builder, vec, value, index, "");
1088 LLVMValueRef index)
1090 return LLVMBuildGEP(ctx->builder, base_ptr, &index, 1, "");
1093 LLVMValueRef ac_build_gep0(struct ac_llvm_context *ctx, LLVMValueRef base_ptr, LLVMValueRef index)
1097 index,
1102 LLVMValueRef ac_build_pointer_add(struct ac_llvm_context *ctx, LLVMValueRef ptr, LLVMValueRef index)
1104 LLVMValueRef offset_ptr = LLVMBuildGEP(ctx->builder, ptr, &index, 1, "");
1108 void ac_build_indexed_store(struct ac_llvm_context *ctx, LLVMValueRef base_ptr, LLVMValueRef index,
1111 LLVMBuildStore(ctx->builder, value, ac_build_gep0(ctx, base_ptr, index));
1116 * It's equivalent to doing a load from &base_ptr[index].
1119 * \param index The element index into the array.
1120 * \param uniform Whether the base_ptr and index can be assumed to be
1125 * "base_ptr + index * elemsize" into "addr + offset" (excluding GEPs
1136 * ptr1 = LLVMBuildGEP(base_ptr, index);
1143 LLVMValueRef index, bool uniform, bool invariant,
1150 pointer = LLVMBuildInBoundsGEP(ctx->builder, base_ptr, &index, 1, "");
1152 pointer = LLVMBuildGEP(ctx->builder, base_ptr, &index, 1, "");
1163 LLVMValueRef ac_build_load(struct ac_llvm_context *ctx, LLVMValueRef base_ptr, LLVMValueRef index)
1165 return ac_build_load_custom(ctx, base_ptr, index, false, false, false);
1169 LLVMValueRef index)
1171 return ac_build_load_custom(ctx, base_ptr, index, false, true, false);
1177 LLVMValueRef index)
1179 return ac_build_load_custom(ctx, base_ptr, index, true, true, true);
1184 LLVMValueRef base_ptr, LLVMValueRef index)
1186 return ac_build_load_custom(ctx, base_ptr, index, true, true, false);
1850 /* The HW returns the last bit index from MSB, but NIR/TGSI wants
1851 * the index from LSB. Invert it by doing "31 - msb". */
1908 /* The HW returns the last bit index from MSB, but TGSI/NIR wants
1909 * the index from LSB. Invert it by doing "31 - msb". */
3081 /* Adjust the sample index according to FMASK.
3092 * The sample index should be adjusted as follows:
3114 /* Don't rewrite the sample index if WORD1.DATA_FORMAT of the FMASK
3131 /* Mask the sample index by 0x7, because 0x8 means an unknown value
4173 LLVMValueRef ac_build_shuffle(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef index)
4178 index = LLVMBuildMul(ctx->builder, index, LLVMConstInt(ctx->i32, 4, 0), "");
4182 ac_build_intrinsic(ctx, "llvm.amdgcn.ds.bpermute", ctx->i32, (LLVMValueRef[]){index, src}, 2,
4450 * - bits 0..8: index 0
4452 * - bits 10..18: index 1
4454 * - bits 20..28: index 2
4464 tmp = LLVMBuildShl(builder, prim->index[i], LLVMConstInt(ctx->i32, 10 * i, false), "");
4586 LLVMValueRef index[3])
4595 * If the first vertex is provoking, swap index 1 and 2.
4596 * If the last vertex is provoking, swap index 0 and 1.
4598 out[0] = LLVMBuildSelect(builder, flatshade_first, index[0],
4599 LLVMBuildSelect(builder, is_odd, index[1], index[0], ""), "");
4601 LLVMBuildSelect(builder, is_odd, index[2], index[1], ""),
4602 LLVMBuildSelect(builder, is_odd, index[0], index[1], ""), "");
4604 LLVMBuildSelect(builder, is_odd, index[1], index[2], ""), index[2], "");
4605 memcpy(index, out, sizeof(out));