summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-23Stop trying to ship swrastg through libgl1-mesa-dri-experimental, it ↵debian-experimentalCyril Brulebois2-1/+3
replaced the non-gallium variant.
2011-12-23Update not-installed for removed files.Cyril Brulebois2-6/+1
2011-12-23Kiss good-bye to DRI1 drivers.Cyril Brulebois2-3/+6
2011-12-23Refresh patches.Cyril Brulebois3-21/+5
2011-12-23Bump changelog.Cyril Brulebois1-0/+6
2011-12-23Import Debian packaging from 7.11.2-1.Cyril Brulebois74-0/+4604
Branch switching does so much harm it's probably better to just import the debian/ directory only.
2011-12-22gallivm: Close a memory leakupstream-experimentalLauri Kasanen1-0/+1
Hi all This fixes a memory leak of 32 bytes on exit. From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <curaga@operamail.com> Date: Thu, 22 Dec 2011 21:28:33 +0200 Subject: [PATCH] gallivm: Close a memory leak As reported by "valgrind --leak-check=full glxgears". Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-12-22softpipe: try and use back color for a slot if color fails.Dave Airlie1-0/+5
In the case where a front and back output are specified, the draw code will copy the back output into the front color slot and everything is happy. However if no front is specified then the draw code will do a bad copy (separate patch), but also the frag shader won't pick up the color as there there is no write to COLOR from the vertex shader just BCOLOR. This patch fixes that problem so if it can't find a vertex shader output for the front color slot, it will go and lookup and use one for the back color slot. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-22format_unpack: add 8/16 rgba/rgb types.Dave Airlie1-0/+134
fixing these makes piglit fbo-integer pass on softpipe. modified to re-order things, haven't addressed Eric's concerns, can't find anything in spec that mentions sign extensions, it does say integers aren't clamped or modified. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-21i965: Don't make consumers of brw_CONT/brw_WHILE track if depth in loop.Eric Anholt6-58/+25
The codegen backends all had this same tracking, so just do it at the EU level. Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-12-21i965: Don't make consumers of brw_WHILE do pre-gen6 BREAK/CONT patching.Eric Anholt4-86/+45
The EU code itself can just do this work, since all the consumers were duplicating it. Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-12-21i965: Don't make consumers of brw_DO()/brw_WHILE() track loop start.Eric Anholt9-28/+58
This is a similar cleanup to what we did for brw_IF(), brw_ELSE(), brw_ENDIF() handling. Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-12-21i965: Drop unused do_insn argument from gen6_CONT().Eric Anholt5-7/+5
The branch distances get patched up later at the WHILE instruction. Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-12-21mesa: Add _NEW_RASTERIZER_DISCARD as synonym for _NEW_TRANSFORM.Paul Berry4-5/+12
This makes it easier to keep track of which dirty bits correspond to which pieces of context, since it makes _NEW_RASTERIZER_DISCARD correspond with ctx->RasterDiscard. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-12-21mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry8-19/+19
Previously we were storing the RasterDiscard flag (for GL_RASTERIZER_DISCARD) in gl_context::TransformFeedback. This was confusing, because we use the _NEW_TRANSFORM flag (not _NEW_TRANSFORM_FEEDBACK) to track state updates to it, and because rasterizer discard has effects even when transform feedback is not in use. This patch makes RasterDiscard a toplevel element in gl_context rather than a subfield of gl_context::TransformFeedback. Note: We can't put RasterDiscard inside gl_context::Transform, since all items inside gl_context::Transform need to be pieces of state that are saved and restored using PushAttrib and PopAttrib. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-12-21egl/x11: Merge the right version of Frederiks changeKristian Høgsberg1-21/+8
Argh, I merged an older broken version of the swapbuffer change instead of Frederiks fixed version. This diffs gets us back to the right version.
2011-12-20egl_dri2/x11: Add support for the DRI2 SwapBuffers requestFredrik Höglund2-21/+81
2011-12-20egl_dri2/x11: Add support for eglSwapIntervalFredrik Höglund3-1/+36
2011-12-20i965 gen6: Turn on transform feedback extension unconditionally.Paul Berry1-1/+1
Previously, we only enabled transform feedback when MESA_GL_VERSION_OVERRIDE was 3.0 or greater, since transform feedback support was not completely finished, so it didn't make sense to advertise support for it unless absolutely necessary. Now that transform feedback is fully implemented on gen6, we can enable this extension unconditionally. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965 gen6: Implement transform feedback queries.Paul Berry3-0/+54
This patch adds software-based PRIMITIVES_GENERATED and TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN queries that work by keeping track of the number of primitives that are sent down the pipeline, and adjusting as necessary to account for the way each primitive type is tessellated. In the long run we'll want to replace this with a hardware-based implementation, because the software approach won't work with geometry shaders or primitive restart. However, at the moment, we don't have the necessary kernel support to implement a hardware-based query (we would need the kernel to save GPU registers when context switching, so that drawing performed by another process doesn't get counted). Fixes Piglit tests EXT_transform_feedback/query-primitives_generated-* and EXT_transform_feedback/query-primitives-written-*. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965: Convert if/else to switch statements in brw_queryobj.cPaul Berry1-6/+30
Previously, i965 only supported two query types: GL_TIME_ELAPSED_EXT and GL_SAMPLES_PASSED_ARB, and it distinguished between the two using if/else statements that compared query->Base.Target to GL_TIME_ELAPSED_EXT. This patch changes the if/else statements to switch statements so that we can add more query types without having to have a chain of else-ifs. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965 gen6: Ensure correct transform feedback indices on new batch.Paul Berry5-8/+72
We don't currently have kernel support for saving GPU registers on a context switch, so if multiple processes are performing transform feedback at the same time, their SVBI registers will interfere with each other. To avoid this situation, we keep a software shadow of the state of the SVBI 0 register (which is the only register we use), and re-upload it on every new batch. The function that updates the shadow state of SVBI 0 is called brw_update_primitive_count, since it will also be used to update the counters for the PRIMITIVES_GENERATED and TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN queries. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20mesa: Add a function to query whether a meta-op is in progress.Paul Berry2-0/+13
This is needed by i965 to ensure that transform feedback counters are not incremented during meta-ops. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20mesa: Add count_tessellated_primitives() function.Paul Berry2-0/+51
This function computes the number of primitives that will be generated when the given drawing operation is performed. It accounts for the tessellation that is performed on line strips, line loops, triangle strips, triangle fans, quads, quad strips, and polygons, so it is suitable for implementing the primitive counters needed by transform feedback. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20mesa: Remove unnecessary FLUSH_VERTICES in bind_buffer_rangePaul Berry1-1/+5
It isn't necessary to call FLUSH_VERTICES from bind_buffer_range, because transform feedback buffers are not allowed to be changed when transform feedback is active. Thanks to Marek Olšák for pointing out this bug. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-12-20i965 gen6: Implement rasterizer discard.Paul Berry3-0/+37
This patch enables rasterizer discard functionality (a part of transform feedback) in Gen6, by generating an alternate GS program when rasterizer discard is active. Instead of forwarding vertices down the pipeline, the alternate GS program uses a URB Write message to deallocate the URB entry that was allocated by FF sync and terminate the thread. Note: parts of the Sandy Bridge PRM seem to imply that we could do this more efficiently, by clearing the GEN6_GS_RENDERING_ENABLE bit, and not allocating a URB entry at all. However, it's not clear how we are supposed to terminate the thread if we do that. Volume 2 part 1, section 4.5.4, says "GS threads must terminate by sending a URB_WRITE message with the EOT and Complete bits set.", and my experiments so far confirm that. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965: Implement bounds checking for transform feedback output.Kenneth Graunke4-0/+52
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2011-12-20i965: Flush pipeline on EndTransformFeedback.Paul Berry3-0/+22
A common use case for transform feedback is to perform one draw operation that writes transform feedback output to a buffer, followed by a second draw operation that consumes that buffer as vertex input. Since vertex input is consumed at an earlier pipeline stage than writing transform feedback output, we need to flush the pipeline to ensure that the transform feedback output is completely written before the data is consumed. In an ideal world, we would do some dependency tracking, so that we would only flush the pipeline if the next draw call was about to consume data generated by a previous draw call in the same batch. However, since we don't have that sort of dependency tracking infrastructure right now, we just unconditionally flush the buffer every time glEndTransformFeedback() is called. This will cause a performance hit compared to the ideal case (since we will sometimes flush the pipeline unnecessarily), but fortunately the performance hit will be confined to circumstances where transform feedback is in use. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-20i965 gen6+: Make intel_batchbuffer_emit_mi_flush() actually flush.Paul Berry1-1/+2
Previous to this patch, the function intel_batchbuffer_emit_mi_flush() was a bit of a misnomer. On Gen4+, when not using the blit engine, it didn't actually flush the pipeline--it simply generated a PIPE_CONTROL command with the necessary bits set to flush GPU caches. This was usually sufficient, since in most situations where intel_batchbuffer_emit_mi_flush() was called, all we really care about was ensuring cache coherency. However, with the advent of OpenGL 3.0, there are two cases in which data output by one stage of the pipeline might be consumed, in a later draw operation, by an earlier stage of the pipeline: (a) When using textures in the vertex shader. (b) When using drawing with a vertex buffer that was previously generated using transform feedback. This patch addresses case (a) by changing intel_batchbuffer_emit_mi_flush() so that on Gen6+, it sets the PIPE_CONTROL_CS_STALL bit (this forces the pipeline to actually flush). (Case (b) will be addressed by the next patch in the series). This is not an ideal solution--in a perfect world, the driver would have some buffer dependency tracking so that we would only have to flush the pipeline in the two cases above. Until that dependency tracking is implemented, however, it seems prudent to have intel_batchbuffer_emit_mi_flush() actually flush the pipeline, so that we get correct rendering, at the expense of a (hopefully small) performance hit. The change is only applied to Gen6+, since at the moment only Gen6+ supports the OpenGL 3.0 features that make a full pipeline flush necessary. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-20i965 gen6: Turn on transform feedback extension.Paul Berry1-0/+3
This patch advertises support for EXT_transform_feedback on Intel Gen6. Since transform feedback support is not completely finished yet, for now we only advertise support for it when MESA_GL_VERSION_OVERRIDE is 3.0 or greater (since transform feedback is required by GL version 3.0). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965 gen6: Initial implementation of transform feedback.Paul Berry15-10/+417
This patch adds basic transform feedback capability for Gen6 hardware. This consists of several related pieces of functionality: (1) In gen6_sol.c, we set up binding table entries for use by transform feedback. We use one binding table entry per transform feedback varying (this allows us to avoid doing pointer arithmetic in the shader, since we can set up the binding table entries with the appropriate offsets and surface pitches to place each varying at the correct address). (2) In brw_context.c, we advertise the hardware capabilities, which are as follows: MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 64 MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 4 MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 16 OpenGL 3.0 requires these values to be at least 64, 4, and 4, respectively. The reason we advertise a larger value than required for MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS is that we have already set aside 64 binding table entries, so we might as well make them all available in both separate attribs and interleaved modes. (3) We set aside a single SVBI ("streamed vertex buffer index") for use by transform feedback. The hardware supports four independent SVBI's, but we only need one, since vertices are added to all transform feedback buffers at the same rate. Note: at the moment this index is reset to 0 only when the driver is initialized. It needs to be reset to 0 whenever BeginTransformFeedback() is called, and otherwise preserved. (4) In brw_gs_emit.c and brw_gs.c, we modify the geometry shader program to output transform feedback data as a side effect. (5) In gen6_gs_state.c, we configure the geometry shader stage to handle the SVBI pointer correctly. Note: ordering of vertices is not yet correct for triangle strips (alternate triangles are improperly oriented). This will be addressed in a future patch. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-20i965 gs: Move vue_map to brw_gs_compile.Paul Berry2-3/+4
This patch stores the geometry shader VUE map from a local variable in compile_gs_prog() to a field in the brw_gs_compile struct, so that it will be available while compiling the geometry shader. This is necessary in order to support transform feedback on Gen6, because the Gen6 geometry shader code that supports transform feedback needs to be able to inspect the VUE map in order to find the correct vertex data to output. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20i965 gen6+: Use 1-wide null operands for IF instructionsPaul Berry1-4/+4
The Sandy Bridge PRM, volume 4, part 2, section 5.3.10 ("5.3.10 Register Region Restrictions") contains the following restriction on the execution size and operand width of instructions: "3. ExecSize must be equal to or greater than Width." When emitting an IF instruction in single program flow mode on Gen6+, we use an ExecSize of 1, therefore the Width of each operand must also be 1. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20mesa: Fix off-by-one error in transform feedback size check.Paul Berry1-1/+1
In _mesa_BindBufferRange(), we need to verify that the offset and size specified by the client do not exceed the size of the underlying buffer. We were accidentally doing this check using ">=" rather than ">", so we were generating a bogus error if the client specified an offset and size that fit exactly in the underlying buffer. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-20mesa: Record transform feedback strides/offsets in linker output.Paul Berry2-1/+14
This patch adds two new fields to the gl_transform_feedback_info struct: - BufferStride records the total number of components (per vertex) that transform feedback is being instructed to store in each buffer. - Outputs[i].DstOffset records the offset within the interleaved structure of each transform feedback output. These values are needed by the i965 gen6 and r600g back-ends, so it seems better to have the linker provide them rather than force each back-end to compute them independently. Also, DstOffset helps pave the way for supporting ARB_transform_feedback3, which allows the transform feedback output to contain holes between attributes by specifying gl_SkipComponents{1,2,3,4} as the varying name. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-12-20Fix compilation on cygwin after commit 762c9766c93697af8d7fbaa729aed118789dbe8eJon TURNEY1-1/+1
Fix compilation on cygwin after commit 762c9766c93697af8d7fbaa729aed118789dbe8e "Use VERT_ATTRIB_* indexed array in gl_array_object" added the first non-driver use of ffsll(), which exposes the fact that this isn't provided on cygwin. Found by tinderbox, see [1] [1] http://tinderbox.freedesktop.org/builds/2011-11-30-0017/logs/libGL/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-20xvmc: Remove unused variableMaarten Lankhorst1-3/+0
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com> Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-20vl: Remove unused declarationMaarten Lankhorst1-1/+1
csc is not used for rgba and gives a warning. Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com> Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-20vl: Use pipe clear_render_target instead of util_clear_render_targetMaarten Lankhorst1-2/+2
Mapping to software and uploading again clearing is killing performance. Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com> Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-20mesa: fix a leak in _mesa_delete_texture_image()Pekka Paalanen1-0/+1
Valgrind complains about a definitely lost block allocated in intelNewTextureImage(). This leak was apparently created by 6e0f9001fe3fb191c2928bd09aa9e9d05ddf4ea9, "mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrast", as it removes the free() from _mesa_delete_texture_image(). Put the free() back, fixes a Valgrind error. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-20st/egl: error check and clamp coordinates in eglPostSubBufferNVChia-I Wu1-8/+21
EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.
2011-12-20egl_dri2/x11: error check coordinates in eglPostSubBufferNVChia-I Wu1-5/+5
EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.
2011-12-20st/egl: Add support for EGL_NV_post_sub_bufferFredrik Höglund2-2/+24
Signed-off-by: Fredrik Höglund <fredrik@kde.org> [olv: remove #ifdef checks]
2011-12-20egl_dri2/x11: Add support for EGL_NV_post_sub_bufferFredrik Höglund1-0/+17
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
2011-12-20egl: add EGL_NV_post_sub_bufferFredrik Höglund6-0/+48
v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in _eglParseSurfaceAttribList() Signed-off-by: Fredrik Höglund <fredrik@kde.org> [olv: remove #ifdef checks]
2011-12-20egl: KHR_reusable_sync entrypoints are missing from eglGetProcAddressChia-I Wu1-0/+5
2011-12-20egl: remove #ifdef's for official extensionsChia-I Wu11-84/+0
There is no point in having them when we distribute eglext.h. As for unofficial extensions, there is a chance that we might remove some of them evetually. Keeping the #ifdef's for now should make that easier.
2011-12-20egl: remove EGL_ANDROID_swap_rectangleChia-I Wu5-43/+0
We never support this unofficial extension, and it has been removed from Android recently. There is no point in keeping it.
2011-12-20egl: update headersChia-I Wu3-24/+73
Update to revision 15052. EGL_MESA_drm_image is now official. But apparently we have our own extension to it and we need this in eglmesaext.h: #ifdef EGL_MESA_drm_image /* Mesa's extension to EGL_MESA_drm_image... */ #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA #define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 #endif #endif Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-20egl: move unofficial extensions to eglmesaext.hChia-I Wu2-136/+176
As suggested by Ian in http://lists.freedesktop.org/archives/mesa-dev/2011-December/016035.html Note that eglext.h has to include eglmesaext.h at the end instead of the beginning because some extensions in eglmesaext.h depend on the official extensions. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>