struct tgsi_token * tokens;
struct si_pipe_shader *shader;
unsigned type; /* TGSI_PROCESSOR_* specifies the type of shader. */
-/* unsigned num_inputs; */
+ unsigned ninput_emitted;
/* struct list_head inputs; */
/* unsigned * input_mappings *//* From TGSI to SI hw */
/* struct tgsi_shader_info info;*/
return;
}
+ if (!si_shader_ctx->ninput_emitted++) {
+ /* Enable whole quad mode */
+ lp_build_intrinsic(gallivm->builder,
+ "llvm.SI.wqm",
+ LLVMVoidTypeInContext(gallivm->context),
+ NULL, 0);
+ }
+
/* XXX: Could there be more than TGSI_NUM_CHANNELS (4) ? */
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
LLVMValueRef args[3];
dump = debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE);
- memset(&si_shader_ctx.radeon_bld, 0, sizeof(si_shader_ctx.radeon_bld));
+ memset(&si_shader_ctx, 0, sizeof(si_shader_ctx));
radeon_llvm_context_init(&si_shader_ctx.radeon_bld);
bld_base = &si_shader_ctx.radeon_bld.soa.bld_base;