Commit 65b542a7 authored by Nicolai Hähnle's avatar Nicolai Hähnle

st/mesa: implement ARB_shader_clock

Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent 94ec847c
......@@ -599,6 +599,7 @@ void st_init_extensions(struct pipe_screen *screen,
{ o(ARB_robust_buffer_access_behavior), PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR },
{ o(ARB_sample_shading), PIPE_CAP_SAMPLE_SHADING },
{ o(ARB_seamless_cube_map), PIPE_CAP_SEAMLESS_CUBE_MAP },
{ o(ARB_shader_clock), PIPE_CAP_TGSI_CLOCK },
{ o(ARB_shader_draw_parameters), PIPE_CAP_DRAW_PARAMETERS },
{ o(ARB_shader_group_vote), PIPE_CAP_TGSI_VOTE },
{ o(ARB_shader_stencil_export), PIPE_CAP_SHADER_STENCIL_EXPORT },
......
......@@ -3963,6 +3963,16 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
visit_image_intrinsic(ir);
return;
case ir_intrinsic_shader_clock: {
ir->return_deref->accept(this);
st_dst_reg dst = st_dst_reg(this->result);
dst.writemask = TGSI_WRITEMASK_XY;
emit_asm(ir, TGSI_OPCODE_CLOCK, dst);
return;
}
case ir_intrinsic_invalid:
case ir_intrinsic_generic_load:
case ir_intrinsic_generic_store:
......@@ -3974,7 +3984,6 @@ glsl_to_tgsi_visitor::visit(ir_call *ir)
case ir_intrinsic_generic_atomic_max:
case ir_intrinsic_generic_atomic_exchange:
case ir_intrinsic_generic_atomic_comp_swap:
case ir_intrinsic_shader_clock:
unreachable("Invalid intrinsic");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment