diff options
Diffstat (limited to 'mesalib')
-rw-r--r-- | mesalib/configure.ac | 2 | ||||
-rw-r--r-- | mesalib/docs/GL3.txt | 8 | ||||
-rw-r--r-- | mesalib/docs/news.html | 8 | ||||
-rw-r--r-- | mesalib/docs/relnotes-8.0.4.html | 201 | ||||
-rw-r--r-- | mesalib/docs/relnotes-8.1.html | 1 | ||||
-rw-r--r-- | mesalib/docs/relnotes.html | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_API.xml | 22 | ||||
-rw-r--r-- | mesalib/src/mesa/main/dd.h | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/main/dlist.c | 24 | ||||
-rw-r--r-- | mesalib/src/mesa/main/extensions.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/main/get.c | 15 | ||||
-rw-r--r-- | mesalib/src/mesa/main/queryobj.c | 78 | ||||
-rw-r--r-- | mesalib/src/mesa/main/texcompress_etc.h | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_queryobj.c | 14 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 5 |
15 files changed, 376 insertions, 14 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 46265a221..b5250f321 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -33,7 +33,7 @@ USER_CXXFLAGS="$CXXFLAGS" dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.24 LIBDRM_RADEON_REQUIRED=2.4.31 -LIBDRM_INTEL_REQUIRED=2.4.34 +LIBDRM_INTEL_REQUIRED=2.4.37 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED=2.4.33 DRI2PROTO_REQUIRED=2.6 diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt index 36d24725d..8357289ea 100644 --- a/mesalib/docs/GL3.txt +++ b/mesalib/docs/GL3.txt @@ -42,8 +42,8 @@ GLX_ARB_create_context (GLX 1.4 is required) DONE GL 3.1: -GLSL 1.40 missing: UBOS, inverse(), - highp change +GLSL 1.40 needs UBOs (in progress) +Forward compatibile context support/deprecations not started Instanced drawing (GL_ARB_draw_instanced) DONE (i965, gallium, swrast) Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, swrast) Primitive restart (GL_NV_primitive_restart) DONE (i965, r600) @@ -80,7 +80,7 @@ GL_ARB_sampler_objects DONE (i965, r300, r600) GL_ARB_shader_bit_encoding DONE GL_ARB_texture_rgb10_a2ui DONE (r600) GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast) -GL_ARB_timer_query ~60% done (the EXT variant) +GL_ARB_timer_query DONE GL_ARB_instanced_arrays DONE (i965, r300, r600) GL_ARB_vertex_type_2_10_10_10_rev DONE (r600) @@ -91,6 +91,7 @@ GLSL 4.0 not started GL_ARB_texture_query_lod not started GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe) GL_ARB_draw_indirect not started +GL_ARB_gpu_shader5 not started GL_ARB_gpu_shader_fp64 not started GL_ARB_sample_shading not started GL_ARB_shader_subroutine not started @@ -114,6 +115,7 @@ GL_ARB_viewport_array not started GL 4.2: + GLSL 4.2 not started GL_ARB_texture_compression_bptc not started GL_ARB_compressed_texture_pixel_storage not started diff --git a/mesalib/docs/news.html b/mesalib/docs/news.html index b6b82671c..541bde67b 100644 --- a/mesalib/docs/news.html +++ b/mesalib/docs/news.html @@ -9,6 +9,14 @@ <h1>News</h1> +<h2>July 10, 2012</h2> + +<p> +<a href="relnotes-8.0.4.html">Mesa 8.0.4</a> is released. +This is a bug fix release. +</p> + + <h2>May 18, 2012</h2> <p> diff --git a/mesalib/docs/relnotes-8.0.4.html b/mesalib/docs/relnotes-8.0.4.html new file mode 100644 index 000000000..529140af2 --- /dev/null +++ b/mesalib/docs/relnotes-8.0.4.html @@ -0,0 +1,201 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="mesa.css"> +</head> +<body> + +<h1>Mesa 8.0.4 Release Notes / July 10, 2012</h1> + +<p> +Mesa 8.0.4 is a bug fix release which fixes bugs found since the 8.0.2 release. +</p> +<p> +Mesa 8.0.4 implements the OpenGL 3.0 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.0. +</p> +<p> +See the <a href="install.html">Compiling/Installing page</a> for prerequisites +for DRI hardware acceleration. +</p> + + +<h2>MD5 checksums</h2> +<pre> +02b96082d2f1ad72e7385f4022afafb9 MesaLib-8.0.4.tar.gz +d546f988adfdf986cff45b1efa2d8a46 MesaLib-8.0.4.tar.bz2 +1f0fdabe6e8019d4de6c16e20e74d163 MesaLib-8.0.4.zip +</pre> + +<h2>New features</h2> +<p>None.</p> + +<h2>Bug fixes</h2> + +<p>This list is likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=45967">Bug 45967</a> - piglit getteximage-invalid-format-for-packed-type regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47742">Bug 47742</a> - [softpipe] piglit fbo-generatemipmap-array regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48141">Bug 48141</a> - [vmwgfx] src/gallium/auxiliary/util/u_inlines.h:256:pipe_buffer_map_range: Assertion `offset + length <= buffer->width0' failed.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48472">Bug 48472</a> - GPU Lockup while running demo (rzr - the scene is dead) in wine</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50033">Bug 50033</a> - src/mesa/state_tracker/st_cb_fbo.c:379:st_render_texture: Assertion `strb->rtt_level <= strb->texture->last_level' failed.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50621">Bug 50621</a> - Mesa fails its test suite with a buffer overflow.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50298">Bug 50298</a> - [ILK IVB bisected]Ogles2conform GL/sin/sin_float_vert_xvary.test regressed</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51574">Bug 51574</a> - ir_loop_jump constructor assigns member variable to itself</li> + +<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> --> + +</ul> + + +<h2>Changes</h2> +<p>The full set of changes can be viewed by using the following GIT command:</p> + +<pre> + git log mesa-8.0.3..mesa-8.0.4 +</pre> + +<p>Andreas Betz (1):</p> +<ul> + <li>vega: fix 565 color unpacking bug</li> +</ul> + +<p>Antoine Labour (2):</p> +<ul> + <li>meta: Cleanup the resources we allocate.</li> + <li>mesa: Free uniforms correclty.</li> +</ul> + +<p>Brian Paul (22):</p> +<ul> + <li>docs: add link to 8.0.3 release notes</li> + <li>mesa: fix Z32_FLOAT -> uint conversion functions</li> + <li>draw: fix primitive restart bug by using the index buffer offset</li> + <li>st/mesa: fix glDrawPixels(GL_DEPTH_COMPONENT) color output</li> + <li>svga: fix synchronization bug between sampler views and surfaces</li> + <li>mesa: new _mesa_error_check_format_and_type() function</li> + <li>mesa: add missing GL_UNSIGNED_INT_10F_11F_11F_REV case</li> + <li>mesa: fix missing return value in getteximage_error_check()</li> + <li>st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium drivers</li> + <li>svga: add 0.5 in float->int conversion of sample min/max lod</li> + <li>svga: fix min/max lod clamping</li> + <li>svga: change PIPE_CAPF_MAX_TEXTURE_LOD_BIAS from 16.0 to 15.0</li> + <li>st/mesa: add fallback pipe formats for (compressed) R, RG formats</li> + <li>st/mesa: copy num_immediates field when copying the immediates array</li> + <li>svga: move svga_texture() casts/calls in svga_surface_copy()</li> + <li>svga: reset vertex buffer offset in svga_release_user_upl_buffers()</li> + <li>st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffers</li> + <li>st/mesa: use private pipe_sampler_view in decompress_with_blit()</li> + <li>st/mesa: add null pointer check in st_texture_image_map()</li> + <li>st/mesa: fix mipmap image size computation w.r.t. texture arrays</li> + <li>draw: fix missing immediates bug in polygon stipple code</li> + <li>st/mesa: fix max_offset computation for base vertex</li> +</ul> + +<p>Christoph Bumiller (1):</p> +<ul> + <li>nv50: handle NEG,ABS modifiers for short RCP encoding</li> +</ul> + +<p>Dylan Noblesmith (1):</p> +<ul> + <li>mesa: require GL_MAX_SAMPLES >= 4 for GL 3.0</li> +</ul> + +<p>Eric Anholt (1):</p> +<ul> + <li>i965/vs: Fix texelFetchOffset()</li> +</ul> + +<p>Ian Romanick (5):</p> +<ul> + <li>docs: Add 8.0.3 release md5sums</li> + <li>glx/tests: Fix off-by-one error in allocating extension string buffer</li> + <li>glsl: Remove spurious printf messages</li> + <li>glsl: Fix pi/2 constant in acos built-in function</li> + <li>mesa: Bump version number to 8.0.4</li> +</ul> + +<p>José Fonseca (2):</p> +<ul> + <li>mesa: Avoid void acinclude.m4 Android.common.mk Android.mk autogen.sh bin common.py configs configure.ac docs doxygen include Makefile scons SConstruct src tests arithmetic.</li> + <li>draw: Ensure that prepare is always run after LLVM garbagge collection.</li> +</ul> + +<p>Kenneth Graunke (15):</p> +<ul> + <li>mesa: Check for a negative "size" parameter in glCopyBufferSubData().</li> + <li>i965: Fix brw_swap_cmod() for LE/GE comparisons.</li> + <li>glsl: Remove unused ir_loop_jump::loop pointer.</li> + <li>ralloc: Fix ralloc_parent() of memory allocated out of the NULL context.</li> + <li>mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).</li> + <li>glsl/builtins: Fix textureGrad() for Array samplers.</li> + <li>mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.</li> + <li>mesa: Support BindBuffer{Base,Offset,Range} with a buffer of 0.</li> + <li>mesa: Unbind ARB_transform_feedback2 binding points on Delete too.</li> + <li>meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().</li> + <li>i965/fs: Fix texelFetchOffset() on pre-Gen7.</li> + <li>i965/vs: Fix texelFetchOffset() on pre-Gen7.</li> + <li>i965/fs: Fix user-defined FS outputs with less than four components.</li> + <li>glsl: Hook up loop_variable_state destructor to plug a memory leak.</li> + <li>glsl: Don't trust loop analysis in the presence of function calls.</li> +</ul> + +<p>Kurt Roeckx (1):</p> +<ul> + <li>i830: Fix crash for GL_STENCIL_TEST in i830Enable()</li> +</ul> + +<p>Lukas Rössler (1):</p> +<ul> + <li>glu: fix two Clang warnings</li> +</ul> + +<p>Marek Olšák (2):</p> +<ul> + <li>mesa: allow exposing GL3 without EXT_texture_integer</li> + <li>st/mesa: don't do srgb->linear conversion in decompress_with_blit</li> +</ul> + +<p>Paul Seidler (1):</p> +<ul> + <li>tests: include mesa headers</li> +</ul> + +<p>Stéphane Marchesin (3):</p> +<ul> + <li>glx: Handle a null reply in QueryVersion.</li> + <li>i915g: Don't invert signalled/unsignalled fences</li> + <li>i915g: Don't avoid flushing when we have a pending fence.</li> +</ul> + +<p>Thomas Gstädtner (1):</p> +<ul> + <li>gallium/targets: pass ldflags parameter to MKLIB</li> +</ul> + +<p>Vadim Girlin (2):</p> +<ul> + <li>st/mesa: set stObj->lastLevel in guess_and_alloc_texture</li> + <li>r600g: check gpr count limit</li> +</ul> + +<p>Vinson Lee (1):</p> +<ul> + <li>st/mesa: Fix uninitialized members in glsl_to_tgsi_visitor constructor.</li> +</ul> + +</body> +</html> diff --git a/mesalib/docs/relnotes-8.1.html b/mesalib/docs/relnotes-8.1.html index 4901c3022..c6980b688 100644 --- a/mesalib/docs/relnotes-8.1.html +++ b/mesalib/docs/relnotes-8.1.html @@ -36,6 +36,7 @@ Note: some of the new features are only available with certain drivers. <li>GL_ARB_blend_func_extended</li> <li>GL_ARB_debug_output</li> <li>GL_ARB_shader_bit_encoding</li> +<li>GL_ARB_timer_query</li> <li>GL_EXT_unpack_subimage for ES 2.0</li> <li>GL_EXT_read_format_bgra for ES 1.1 and 2.0</li> <li>GL_EXT_texture_rg for ES 2.x</li> diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html index 608035f99..a6ff138ea 100644 --- a/mesalib/docs/relnotes.html +++ b/mesalib/docs/relnotes.html @@ -15,6 +15,7 @@ The release notes summarize what's new or changed in each Mesa release. <ul> <li><a href="relnotes-8.1.html">8.1 release notes</a> +<li><a href="relnotes-8.0.4.html">8.0.4 release notes</a> <li><a href="relnotes-8.0.3.html">8.0.3 release notes</a> <li><a href="relnotes-8.0.2.html">8.0.2 release notes</a> <li><a href="relnotes-8.0.1.html">8.0.1 release notes</a> diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index bcc2f5c2c..01460b49b 100644 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -7981,7 +7981,27 @@ <xi:include href="ARB_texture_rgb10_a2ui.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <!-- 84. GL_ARB_texture_swizzle --> -<!-- 85. GL_ARB_timer_query --> + +<category name="GL_ARB_timer_query" number="85"> + <enum name="TIME_ELAPSED" value="0x88BF"/> + <enum name="TIMESTAMP" value="0x8E28"/> + <type name="int64" size="8"/> + <type name="uint64" unsigned="true" size="8"/> + <function name="GetQueryObjecti64v" alias="GetQueryObjecti64vEXT" static_dispatch="false"> + <param name="id" type="GLuint"/> + <param name="pname" type="GLenum"/> + <param name="params" type="GLint64 *"/> + </function> + <function name="GetQueryObjectui64v" alias="GetQueryObjectui64vEXT" static_dispatch="false"> + <param name="id" type="GLuint"/> + <param name="pname" type="GLenum"/> + <param name="params" type="GLuint64 *"/> + </function> + <function name="QueryCounter" offset="assign" static_dispatch="false"> + <param name="id" type="GLuint"/> + <param name="target" type="GLenum"/> + </function> +</category> <xi:include href="ARB_vertex_type_2_10_10_10_rev.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> diff --git a/mesalib/src/mesa/main/dd.h b/mesalib/src/mesa/main/dd.h index 687a38f44..c8a765f47 100644 --- a/mesalib/src/mesa/main/dd.h +++ b/mesalib/src/mesa/main/dd.h @@ -820,6 +820,12 @@ struct dd_function_table { GLuint name); void (*DeleteSamplerObject)(struct gl_context *ctx, struct gl_sampler_object *samp); + + /** + * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query. + * This should be equivalent to glGetInteger64v(GL_TIMESTAMP); + */ + uint64_t (*GetTimestamp)(struct gl_context *ctx); }; diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index a0d84cfdc..a827d132d 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -469,6 +469,9 @@ typedef enum OPCODE_BEGIN_CONDITIONAL_RENDER, OPCODE_END_CONDITIONAL_RENDER, + /* ARB_timer_query */ + OPCODE_QUERY_COUNTER, + /* The following three are meta instructions */ OPCODE_ERROR, /* raise compiled-in error */ OPCODE_CONTINUE, @@ -5351,6 +5354,23 @@ save_EndQueryARB(GLenum target) } } + +static void GLAPIENTRY +save_QueryCounter(GLuint id, GLenum target) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_QUERY_COUNTER, 2); + if (n) { + n[1].ui = id; + n[2].e = target; + } + if (ctx->ExecuteFlag) { + CALL_QueryCounter(ctx->Exec, (id, target)); + } +} + #endif /* FEATURE_queryobj */ @@ -8345,6 +8365,9 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_END_QUERY_ARB: CALL_EndQueryARB(ctx->Exec, (n[1].e)); break; + case OPCODE_QUERY_COUNTER: + CALL_QueryCounter(ctx->Exec, (n[1].ui, n[2].e)); + break; #endif case OPCODE_DRAW_BUFFERS_ARB: { @@ -10309,6 +10332,7 @@ _mesa_create_save_table(void) _mesa_init_queryobj_dispatch(table); /* glGetQuery, etc */ SET_BeginQueryARB(table, save_BeginQueryARB); SET_EndQueryARB(table, save_EndQueryARB); + SET_QueryCounter(table, save_QueryCounter); #endif SET_DrawBuffersARB(table, save_DrawBuffersARB); diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 793cc4e24..dbc2813f2 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -139,6 +139,7 @@ static const struct extension extension_table[] = { { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 }, { "GL_ARB_texture_storage", o(ARB_texture_storage), GL, 2011 }, { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, + { "GL_ARB_timer_query", o(ARB_timer_query), GL, 2010 }, { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 }, { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2009 }, diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index a83d36721..cff4cf394 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -342,6 +342,7 @@ EXTRA_EXT(ARB_texture_buffer_object); EXTRA_EXT(OES_EGL_image_external); EXTRA_EXT(ARB_blend_func_extended); EXTRA_EXT(ARB_uniform_buffer_object); +EXTRA_EXT(ARB_timer_query); static const int extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { @@ -1353,6 +1354,9 @@ static const struct value_desc values[] = { { GL_UNIFORM_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_uniform_buffer_object }, + /* GL_ARB_timer_query */ + { GL_TIMESTAMP, LOC_CUSTOM, TYPE_INT64, 0, extra_ARB_timer_query } + #endif /* FEATURE_GL */ }; @@ -1807,7 +1811,16 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu case GL_UNIFORM_BUFFER_BINDING: v->value_int = ctx->UniformBuffer->Name; break; - } + /* GL_ARB_timer_query */ + case GL_TIMESTAMP: + if (ctx->Driver.GetTimestamp) { + v->value_int64 = ctx->Driver.GetTimestamp(ctx); + } + else { + _mesa_problem(ctx, "driver doesn't implement GetTimestamp"); + } + break; + } } /** diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index bae5dad1e..805c031ae 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -353,9 +353,66 @@ _mesa_EndQueryARB(GLenum target) static void GLAPIENTRY +_mesa_QueryCounter(GLuint id, GLenum target) +{ + struct gl_query_object *q; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glQueryCounter(%u, %s)\n", id, + _mesa_lookup_enum_by_nr(target)); + + /* error checking */ + if (target != GL_TIMESTAMP) { + _mesa_error(ctx, GL_INVALID_ENUM, "glQueryCounter(target)"); + return; + } + + if (id == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glQueryCounter(id==0)"); + return; + } + + q = _mesa_lookup_query_object(ctx, id); + if (!q) { + /* XXX the Core profile should throw INVALID_OPERATION here */ + + /* create new object */ + q = ctx->Driver.NewQueryObject(ctx, id); + if (!q) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glQueryCounter"); + return; + } + _mesa_HashInsert(ctx->Query.QueryObjects, id, q); + } + else { + if (q->Target && q->Target != GL_TIMESTAMP) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glQueryCounter(id has an invalid target)"); + return; + } + } + + if (q->Active) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glQueryCounter(id is active)"); + return; + } + + q->Target = target; + q->Result = 0; + q->Ready = GL_FALSE; + + /* QueryCounter is implemented using EndQuery without BeginQuery + * in drivers. This is actually Direct3D and Gallium convention. */ + ctx->Driver.EndQuery(ctx, q); +} + + +static void GLAPIENTRY _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) { - struct gl_query_object *q, **bindpt; + struct gl_query_object *q = NULL, **bindpt = NULL; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -364,13 +421,21 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) _mesa_lookup_enum_by_nr(target), _mesa_lookup_enum_by_nr(pname)); - bindpt = get_query_binding_point(ctx, target); - if (!bindpt) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)"); - return; + if (target == GL_TIMESTAMP) { + if (!ctx->Extensions.ARB_timer_query) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)"); + return; + } } + else { + bindpt = get_query_binding_point(ctx, target); + if (!bindpt) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)"); + return; + } - q = *bindpt; + q = *bindpt; + } switch (pname) { case GL_QUERY_COUNTER_BITS_ARB: @@ -581,6 +646,7 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp) SET_GetQueryivARB(disp, _mesa_GetQueryivARB); SET_GetQueryObjectivARB(disp, _mesa_GetQueryObjectivARB); SET_GetQueryObjectuivARB(disp, _mesa_GetQueryObjectuivARB); + SET_QueryCounter(disp, _mesa_QueryCounter); SET_GetQueryObjecti64vEXT(disp, _mesa_GetQueryObjecti64vEXT); SET_GetQueryObjectui64vEXT(disp, _mesa_GetQueryObjectui64vEXT); diff --git a/mesalib/src/mesa/main/texcompress_etc.h b/mesalib/src/mesa/main/texcompress_etc.h index 4e166b2b1..8e8427f8f 100644 --- a/mesalib/src/mesa/main/texcompress_etc.h +++ b/mesalib/src/mesa/main/texcompress_etc.h @@ -30,10 +30,10 @@ struct swrast_texture_image; -extern GLboolean +GLboolean _mesa_texstore_etc1_rgb8(TEXSTORE_PARAMS); -extern void +void _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel); diff --git a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c index b6a236e8d..e5e4a81dc 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c +++ b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c @@ -39,6 +39,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "pipe/p_screen.h" #include "st_context.h" #include "st_cb_queryobj.h" #include "st_cb_bitmap.h" @@ -133,6 +134,11 @@ st_EndQuery(struct gl_context *ctx, struct gl_query_object *q) st_flush_bitmap_cache(st_context(ctx)); + if (q->Target == GL_TIMESTAMP && !stq->pq) { + stq->pq = pipe->create_query(pipe, PIPE_QUERY_TIMESTAMP); + stq->type = PIPE_QUERY_TIMESTAMP; + } + pipe->end_query(pipe, stq->pq); } @@ -169,6 +175,13 @@ st_CheckQuery(struct gl_context *ctx, struct gl_query_object *q) } +static uint64_t +st_GetTimestamp(struct gl_context *ctx) +{ + struct pipe_screen *screen = st_context(ctx)->pipe->screen; + + return screen->get_timestamp(screen); +} void st_init_query_functions(struct dd_function_table *functions) @@ -179,6 +192,7 @@ void st_init_query_functions(struct dd_function_table *functions) functions->EndQuery = st_EndQuery; functions->WaitQuery = st_WaitQuery; functions->CheckQuery = st_CheckQuery; + functions->GetTimestamp = st_GetTimestamp; } #endif /* FEATURE_queryobj */ diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index fd9507536..5b333ad2c 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -636,4 +636,9 @@ void st_init_extensions(struct st_context *st) if (ctx->Const.MaxDualSourceDrawBuffers > 0) ctx->Extensions.ARB_blend_func_extended = GL_TRUE; + + if (screen->get_param(screen, PIPE_CAP_TIMER_QUERY) && + screen->get_param(screen, PIPE_CAP_QUERY_TIMESTAMP)) { + ctx->Extensions.ARB_timer_query = GL_TRUE; + } } |