From 3160b0b9fc2b49b0e9fe684b955eebf3691024ff Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 9 Dec 2012 10:08:13 +0000 Subject: mesa/st: Implement GL_TIME_ELAPSED w/ PIPE_QUERY_TIMESTAMP. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARB/EXT_timer_query's definition of GL_TIME_ELAPSED match precisely the subtraction of two GL_TIMESTAMP queries. And for a lot of drivers, that's precisely how they have to implement internally -- by emitting two hardware timestamp queries. So, to simplify driver implementation, simply allow doing so in the state tracker. Eventually if no driver implements PIPE_QUERY_TIME_ELAPSED then we could retire it. Reviewed-by: Dave Airlie Reviewed-by: Marek Olšák Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_context.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/state_tracker/st_context.h') diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index eeb7f0c4fd6..2be74b45262 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -83,6 +83,7 @@ struct st_context GLboolean clamp_frag_color_in_shader; GLboolean clamp_vert_color_in_shader; boolean has_stencil_export; /**< can do shader stencil export? */ + boolean has_time_elapsed; /* On old libGL's for linux we need to invalidate the drawables * on glViewpport calls, this is set via a option. -- cgit v1.2.3