LLVMValueRef num_vertices_val;
if (ctx->stage == MESA_SHADER_VERTEX) {
- num_vertices_val = LLVMConstInt(ctx->ac.i32, 1, false);
+ LLVMValueRef outprim_val =
+ LLVMConstInt(ctx->ac.i32,
+ ctx->options->key.vs.outprim, false);
+ num_vertices_val = LLVMBuildAdd(builder, outprim_val,
+ ctx->ac.i32_1, "");
num_vertices = 3; /* TODO: optimize for points & lines */
} else {
assert(ctx->stage == MESA_SHADER_TESS_EVAL);
if (pipeline->device->physical_device->rad_info.chip_class < GFX8)
radv_pipeline_compute_get_int_clamp(pCreateInfo, &key.is_int8, &key.is_int10);
+ if (pipeline->device->physical_device->rad_info.chip_class >= GFX10)
+ key.topology = pCreateInfo->pInputAssemblyState->topology;
+
return key;
}
keys[MESA_SHADER_VERTEX].vs.vertex_attribute_offsets[i] = key->vertex_attribute_offsets[i];
keys[MESA_SHADER_VERTEX].vs.vertex_attribute_strides[i] = key->vertex_attribute_strides[i];
}
+ keys[MESA_SHADER_VERTEX].vs.outprim = si_conv_prim_to_gs_out(key->topology);
if (nir[MESA_SHADER_TESS_CTRL]) {
keys[MESA_SHADER_VERTEX].vs_common_out.as_ls = true;
uint8_t num_samples;
uint32_t has_multiview_view_index : 1;
uint32_t optimisations_disabled : 1;
+ uint8_t topology;
};
struct radv_shader_binary;
/* For some formats the channels have to be shuffled. */
uint32_t post_shuffle;
+
+ /* Output primitive type. */
+ uint8_t outprim;
};
struct radv_tes_variant_key {