return;
}
+ found |= key_debug(brw, "input vertices", old_key->input_vertices,
+ key->input_vertices);
found |= key_debug(brw, "TES primitive mode", old_key->tes_primitive_mode,
key->tes_primitive_mode);
found |= brw_debug_recompile_sampler_key(brw, &old_key->tex, &key->tex);
if (!brw_state_dirty(brw,
_NEW_TEXTURE,
+ BRW_NEW_PATCH_PRIMITIVE |
BRW_NEW_TESS_CTRL_PROGRAM |
BRW_NEW_TESS_EVAL_PROGRAM))
return;
key.program_string_id = tcp->id;
+ key.input_vertices = ctx->TessCtrlProgram.patch_vertices;
+
/* _NEW_TEXTURE */
brw_populate_sampler_prog_key_data(ctx, prog, stage_state->sampler_count,
&key.tex);
key.program_string_id = btcp->id;
brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ /* Guess that the input and output patches have the same dimensionality. */
+ key.input_vertices = shader_prog->TessCtrl.VerticesOut;
+
key.tes_primitive_mode = GL_TRIANGLES;
success = brw_codegen_tcs_prog(brw, shader_prog, btcp, &key);
get_nir_dest(instr->dest, BRW_REGISTER_TYPE_UD));
break;
case nir_intrinsic_load_patch_vertices_in:
- unreachable("XXX: gl_PatchVerticesIn not implemented yet.");
+ emit(MOV(get_nir_dest(instr->dest, BRW_REGISTER_TYPE_D),
+ brw_imm_d(key->input_vertices)));
break;
case nir_intrinsic_load_per_vertex_input: {
src_reg indirect_offset = get_indirect_offset(instr);