aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* glx/tests: Add unit tests for the DRI2 part of GLX_MESA_query_rendererIan Romanick2013-11-073-6/+314
| | | | | | | | After adding $(DEFINES) to AM_CPPFLAGS, the __glXGetCurrentContext wrapper function is no longer needed and causes compile errors. Using the correct defines causes it to be a macro! Signed-off-by: Ian Romanick <[email protected]>
* glx/tests: Add unit tests for the GLX part of GLX_MESA_query_rendererIan Romanick2013-11-073-1/+449
| | | | | | | | | | | These tests primarilly ensure that the functions added by this extension don't abuse other interfaces (e.g., glx_screen::query_renderer_integer) when provided bad data. These tests helped me find a couple small bugs in the initial implementation. Signed-off-by: Ian Romanick <[email protected]>
* glx/tests: Add GetGLXScreenConfigs_called flagIan Romanick2013-11-071-0/+4
| | | | | | Tests for the GLX_MESA_query_context extension will use this flag. Signed-off-by: Ian Romanick <[email protected]>
* glx/dri2: Add DRI2 support for GLX_MESA_query_rendererIan Romanick2013-11-075-1/+119
| | | | | | | | | | The new functions for this extension were added to a separate file (dri2_query_renderer.c) to facilitate unit testing. I tried putting them in dri2_glx.c, and it resulting in an unending chain of dependencies. It was the proverbial threading hanging from a sweater. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx/dri2: Pull some internal structures out to a separate header fileIan Romanick2013-11-072-20/+52
| | | | | | | | | This structures will be accessed by internal functions that will be added in a file separate from dri2_glx.c. The new code will be added to a new file to facilitate unit testing. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx/tests: Silence warnings after adding fields to glx_screen_vtableIan Romanick2013-11-071-2/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* glx: Add functions and GLX plumbing for GLX_MESA_query_rendererIan Romanick2013-11-074-1/+186
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx: Add extension tracking GLX_MESA_query_rendererIan Romanick2013-11-072-0/+2
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Wire up initial support for DRI_RENDERER_QUERY extensionIan Romanick2013-11-071-0/+83
| | | | | | | | v2: Use sysconf instead of sysinfo for improved portability. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Wire up initial support for DRI_RENDERER_QUERY extensionIan Romanick2013-11-071-0/+81
| | | | | | | | v2: Use sysconf instead of sysinfo for improved portability. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Add function to implement queries common to all Mesa driversIan Romanick2013-11-072-0/+67
| | | | | | | | | | v2: Add assertions that the version string has the expected format. This will catch build errors (or changes to the version string format) in debug build without exposing release builds to buffer over-runs. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Refactor the renderer string creation out of intelGetStringIan Romanick2013-11-072-13/+23
| | | | | | | | | | | This will soon be used in intel_screen.c from a function that doesn't have a gl_context. v2: Delete local variables that are now unused. This matches v1 of the changes to the i915 driver. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Refactor the renderer string creation out of intelGetStringIan Romanick2013-11-072-13/+23
| | | | | | | | This will soon be used in intel_screen.c from a function that doesn't have a gl_context. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Refactor the vendor string out of intelGetStringIan Romanick2013-11-072-2/+5
| | | | | | | | This will soon be used in intel_screen.c from a function that doesn't have a gl_context. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Refactor the vendor string out of intelGetStringIan Romanick2013-11-072-2/+4
| | | | | | | | | | This will soon be used in intel_screen.c from a function that doesn't have a gl_context. v2: Remove spurious break after return. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable DRI_Robustness extensionIan Romanick2013-11-071-0/+5
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Propagate the GPU reset notifiction strategy down into the driverIan Romanick2013-11-072-5/+29
| | | | | | | | | | If the application requests reset notifiction, connect up the reset status query method and set gl_context::ResetStrategy. v2: Update based on kernel interface / libdrm changes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add function to query the GPU reset status for a contextIan Romanick2013-11-073-0/+71
| | | | | | | v2: Update based on kernel interface / libdrm changes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Handle __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flagIan Romanick2013-11-071-1/+6
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/dri: Move context flag validation down into the driversIan Romanick2013-11-076-9/+27
| | | | | | | | | | | | | | | Soon some drivers will support a different set of flags than other drivers. If some flags have to be filtered in the driver, we might as well filter all of them in the driver. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. v2: Fix some rebase failures noticed by Ken (returning the wrong types, etc.). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategyIan Romanick2013-11-0712-2/+49
| | | | | | | | | | | No drivers advertise the DRI2 extension yet, so no driver should ever see a value other than false for notify_reset. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Implement proper tracking logic for glGetGraphicsResetStatusARBIan Romanick2013-11-071-4/+43
| | | | | | | Drivers still have to implement dd_function_table::GetGraphicsResetStatus. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupResetIan Romanick2013-11-072-0/+20
| | | | | | | | | | These will be used to determine whether to signal a GPU reset after another context in the share group has observed a reset. v2: Change ShareGroupReset from GLboolean to bool. Suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add dd_function_table::GetGraphicsResetStatusIan Romanick2013-11-071-0/+9
| | | | | | | | | | This allows drivers to determine whether a GPU reset has occured. It should return non-zero status if a reset was observed by the specified context. Another mechanism will be used to observe resets occuring in other contexts in the share group. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove gl_context::ResetStatusIan Romanick2013-11-073-5/+1
| | | | | | | | This isn't going to be used in the actual implemenation of glGetGraphicsResetStatus. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xorg: Delete.Matt Turner2013-11-0722-7080/+0
| | | | Acked-by: Lucas Stach <[email protected]>
* xorg-nouveau: Delete.Matt Turner2013-11-074-284/+0
|
* xorg-i915: Delete.Matt Turner2013-11-075-255/+0
| | | | | Acked-by: Jakob Bornecrantz <[email protected]> Acked-by: Stéphane Marchesin <[email protected]>
* i965/gen7: Expose ARB_shader_atomic_counters.Francisco Jerez2013-11-072-0/+13
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Linker support for ARB_shader_atomic_counters.Francisco Jerez2013-11-074-1/+306
| | | | | | | | | | | | | | | v2: Add comments on the purpose of the auxiliary data structures. Check for atomic counter overlaps. Use the contains_atomic() convenience method. Add static assert with the number of expected shader stages. v3: Don't resize atomic arrays. v4: Add comment on the reason why we don't resize atomic counter arrays. Use 'strcmp(...) == 0' instead of '!strcmp(...)'. v5 (idr): Don't use STL in the linker. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Implement parser support for atomic counters.Francisco Jerez2013-11-076-6/+103
| | | | | | | | | | | | | | | | v2: Mark atomic counters as read-only variables. Move offset overlap code to the linker. Use the contains_atomic() convenience method. v3: Use pointer to integer instead of non-const reference. Add comment so we remember to add a spec quotation from the next GLSL release once the issue of atomic counter aggregation within structures is clarified. v4 (idr): Don't use std::map because it's overkill. Add an assertion that ctx->Const.MaxAtomicBufferBindings <= MAX_COMBINED_ATOMIC_BUFFERS. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Revert "i965: Add support for GL_AMD_performance_monitor on Ironlake."Kenneth Graunke2013-11-075-413/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts most of commit 0f2da773070c06b6d20ad264d3abb19c4dfd9761. (I chose to leave the additions to brw_defines.h.) My previous Ironlake implementation was somewhat broken: counter data was global, rather than per-context. This meant that performance monitors captured data from your compositor, 2D driver, and other 3D programs. Originally, I believed that Sandybridge and later had an easy way to avoid this problem (setting per-context flags in OACONTROL), while Ironlake did not. So I'd intended to leave it as a known limitation of performance monitoring support on Ironlake. However, this turned out not to be true. Unfortunately, our hardware only has one set of aggregating performance counters shared between all 3D programs, and their values are not saved or restored by hardware contexts. Also, at least on Sandybridge and Ivybridge, the counters lose their values if the GPU goes to sleep. To work around both of these problems, we have to snapshot the performance counters at the beginning and end of each batch, similar to how we handle query objects on platforms that don't support hardware contexts. For occlusion queries, this batch bookending approach is fairly simple: only one occlusion query can be active at a time, and the result is a single integer. Performance monitors are more complex: an arbitrary number of monitors can be active at a time, each monitoring some subset of our ~30 observability counters. Individual monitors can be started and stopped at any point during the batch. Tracking where each monitor started/ended relative to batch flushes ends up being a pain. And you can run out of space in the buffer. Properly supporting this required some serious rearchitecting of the code. Rather than writing patches to try and morph a broken system into a working one (which operates quite differently), I decided it would be simplest to revert the old code and start fresh. Parts will look familiar, but other parts are new. I also decided it would be best to include Sandybridge and Ivybridge support from the start, since the newer platforms have added complexity that I wanted to make sure worked. They're also what most people care about these days. Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Enable dFdx, dFdy, and fwidth by default in GLSL ES 3.00.Kenneth Graunke2013-11-071-1/+2
| | | | | | | | | | | | | | | Previously, we only exposed them in desktop GL or with: #extension GL_OES_standard_derivatives : enable GLSL ES 3.00 includes these without an extension, so we need to expose them by default. Note that the above #extension line results in an error or desktop GL, so we don't need to worry about this. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* r600g: Add support for PIPE_FORMAT_R11G11B10_FLOAT vertex elementsFredrik Höglund2013-11-072-0/+9
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: Add support for ARB_vertex_type_10f_11f_11f_revFredrik Höglund2013-11-072-1/+12
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* mesa: fix return statements in varray.cBrian Paul2013-11-071-2/+2
| | | | | | Return false, not GL_FALSE. Add missing return value. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71359
* svga: always return 4 for PIPE_MAX_COLOR_BUFSBrian Paul2013-11-071-5/+4
| | | | | | Even if the query returns 8, only 4 really work. Reviewed-by: José Fonseca <[email protected]>
* svga: return true for the PIPE_CAP_SM3 queryBrian Paul2013-11-071-1/+3
| | | | | | | | | | This just tells the state tracker to turn on the GL_ARB_shader_texture_lod extension. This simply allows the GLSL compiler to emit TXL and TXD instructions for both vertex and fragment shaders. We already support these opcodes in the svga driver. Though, the shadow2DGrad() Piglit tests are failing. Reviewed-by: José Fonseca <[email protected]>
* i965: Add an implementation of intel_miptree_map using streaming loads.Matt Turner2013-11-071-0/+85
| | | | | | | | | | Improves performance of RoboHornet's 2D Canvas toDataURL benchmark [http://www.robohornet.org/#e=canvastodataurl] by approximately 5x on Baytrail on ChromiumOS. Elapsed time drops by -81.4861% +/- 1.22619% (n=3 s=14.9105, confidence=95%). Reviewed-by: Chad Versace <[email protected]>
* mesa: Add a streaming load memcpy implementation.Matt Turner2013-11-073-1/+127
| | | | | | | Uses SSE 4.1's MOVNTDQA instruction (streaming load) to read from uncached memory without polluting the cache. Reviewed-by: Chad Versace <[email protected]>
* i965: Fix 'SIMD16 only' dispatch of fragment shader in case of sample shadingAnuj Phogat2013-11-072-14/+25
| | | | | | | | | | | This patch make changes to correctly set up the Dispatch GRF Start Register in case of 'SIMD16 only' FS dispatch. This fixes an issue of incorrect rendering on dolphin emulator with GL_SAMPLE_SHADING enabled. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Enable ARB_vertex_type_10f_11f_11f_rev on Gen6+.Chris Forbes2013-11-081-0/+1
| | | | | | | | This theoretically works on earlier hardware as well, but the extension requires at least GL3.0. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: add support for UNSIGNED_INT_10F_11F_11F_REV vertex attribsChris Forbes2013-11-081-0/+2
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vbo: add 10_11_11 support to vbo_attrib_tmpChris Forbes2013-11-081-6/+26
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add support to _mesa_bytes_per_vertex_attrib for 10_11_11 format.Chris Forbes2013-11-081-0/+5
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add varray support for UNSIGNED_INT_10F_11F_11F_REV typeChris Forbes2013-11-081-3/+17
| | | | | | | | V2: fix interaction with VertexAttribFormat, since that landed after this was originally written Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add extension scaffolding for ARB_vertex_type_10f_11f_11f_revChris Forbes2013-11-082-0/+2
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_floatMatthew McClure2013-11-0714-56/+182
| | | | | | | | | | | | | | | With this patch, the llvmpipe and draw modules will calculate the depth bias according to floating point depth buffer semantics described in the arb_depth_buffer_float specification, when the driver has a z buffer bound with a format type of UTIL_FORMAT_TYPE_FLOAT. By default, the driver will use the existing UNORM calculation for depth bias. A new function, draw_set_zs_format, was added to calculate the Minimum Resolvable Depth value and floating point depth sense for the draw module. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Avoid flushing the batch for every blorp op.Eric Anholt2013-11-074-17/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | This brings over the batch-wrap-prevention and aperture space checking code from the normal brw_draw.c path, so that we don't need to flush the batch every time. There's a risk here if the intel_emit_post_sync_nonzero_flush() call isn't high enough up in the state emit sequences -- before, we implicitly had one at the batch flush before any state was emitted, so Mesa's workaround emits didn't really matter. Since the SNB fixes by Ken, I didn't see any regressions after 3 piglit runs. Improves cairo-gl performance by 13.7733% +/- 1.74876% (n=30/32) Improves minecraft apitrace performance by 1.03183% +/- 0.482297% (n=90). Reduces low-resolution GLB 2.7 performance by 1.17553% +/- 0.432263% (n=88) Reduces Lightsmark performance by 3.70246% +/- 0.322432% (n=126) No statistically significant performance difference on unigine tropics (n=10) No statistically significant performance difference on openarena (n=755) The two apps that are hurt happen to include stalls on busy buffer objects, so I think this is an effect of missing out on an opportune flush. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* build: Build gen_matypes and matypes.h from src/mesa.Matt Turner2013-11-075-103/+15
| | | | Reviewed-by: Eric Anholt <[email protected]>