summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* intel: added null ptr checkBrian Paul2009-05-131-1/+2
| | | | Fixes segfault in context tear-down when glClear was never called.
* intel: create a private gl_array_object for intel_clear_tris(), fix bug 21638Brian Paul2009-05-133-29/+75
| | | | | | | | | gl_array_object encapsulates a set of vertex arrays (see the GL_APPLE_vertex_array_object extension). Create a private gl_array_object for drawing the quad for intel_clear_tris() so we don't have to worry about the user's vertex array state. This fixes the no-op glClear bug #21638 and removes the need to call _mesa_PushClientAttrib() and _mesa_PopClientAttrib().
* mesa: delete array objects before buffer objects during context tear-downBrian Paul2009-05-131-1/+2
| | | | The former may point to the later.
* mesa: clean-up vertex array object VBO unbinding and delete/refcountingBrian Paul2009-05-131-31/+33
| | | | | | Don't really delete vertex array objects until the refcount hits zero. At that time, unbind any pointers to VBOs. (cherry picked from commit 32b851c80792623195069d7a41a5808cff3b2f6f)
* mesa: reference counting for gl_array_objectBrian Paul2009-05-134-13/+84
| | | | | | Every kind of object that can be shared by multiple contexts should be refcounted. (cherry picked from commit 1030bf0ded2a88a5e27f7a4d393c11cfde3d3c5a)
* Test either GL_FRONT_LEFT or GL_FRONT for front-buffer renderingIan Romanick2009-05-111-1/+2
| | | | | | | | | | | | For non-stereo visuals, which is all we support, we treat GL_FRONT_LEFT as GL_FRONT. However, they are technically different, and they have different enum values. Test for either one to determine if we're in front-buffer rendering mode. This fix was suggested by Pierre Willenbrock. Signed-off-by: Ian Romanick <[email protected]> (cherry picked from commit 2085cf24628be7cd297ab0f9ef5ce02bd5a006e2)
* st: do proper refcounting for framebuffer surfacesBrian Paul2009-05-112-6/+17
|
* mesa: Fixed a texture memory leakBrian Paul2009-05-111-0/+3
| | | | | | | | | | | | | | The current texture for any particular texture unit is given an additional reference in update_texture_state(); but if the context is closed before that texture can be released (which is quite frequent in normal use, unless a program unbinds and deletes the texture and renders without it to force a call to update_texture_state(), the memory is lost. This affects general Mesa; but the i965 is particularly affected because it allocates a considerable amount of additional memory for each allocated texture. (cherry picked from master, commit c230767d6956b63a2b101acb48f98823bb5dd31a)
* mesa: set version to 7.5-rc1Brian Paul2009-05-081-1/+1
|
* mesa/st: keep surface_copy arguments positiveKeith Whitwell2009-05-082-3/+68
| | | | | | | The src/dest x,y, and w,h arguments of the pipe->surface_copy function are unsigned and the drivers aren't expecting negative (or extremly-large unsigned) values as inputs. Trim the requests at the state-tracker level before passing down.
* mesa/st: remove redundant call to st_finish in CopyTexSubImageKeith Whitwell2009-05-081-3/+0
| | | | | Rendering should already have been flushed, any synchronization will be done by the driver or memory manager.
* mesa/st: cope with non-ibo index data in st_draw_feedback.cKeith Whitwell2009-05-081-8/+15
| | | | | | Previously only non-indexed or indicies-in-a-vbo cases were handled in this code. This change adds the missing regular indices-in-memory case.
* mesa: Make _mesa_share_state thread safe.José Fonseca2009-05-081-2/+9
|
* mesa: more complete fix for transform_invarient glitchesKeith Whitwell2009-05-086-11/+153
| | | | | | Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
* mesa/main: set PREFER_DP4 to match position_invarient codeKeith Whitwell2009-05-081-1/+1
| | | | | | | | This is a quick fix for z fighting in quake4 caused by the mismatch between vertex transformation here and in the position_invarient code. Full fix would be to make this driver-tunable and adjust both position_invarient and ffvertex_prog.c code to respect driver preferences.
* swrast: fix span clipping bugBrian Paul2009-05-072-22/+71
| | | | | If a horizontal span of pixels was located at x < 0 we could sometimes read/write outside of renderbuffer bounds.
* mesa: unmap buffer objects during context tear-downBrian Paul2009-05-071-0/+4
|
* st: create renderbuffer's pipe_surface in st_render_texture()Brian Paul2009-05-011-1/+11
| | | | | | Previously we created the pipe_surface during framebuffer validation. But if we did a glCopyTex[Sub]Image() before anything else we wouldn't yet have the surface. This fixes that.
* mesa: fix state validation bug for glCopyTex[Sub]Image()Brian Paul2009-05-011-5/+16
| | | | | We need to make sure the framebuffer state is up to date to make sure we read pixels from the right buffer when doing a texture image copy.
* mesa: remove -devel suffix from versionBrian Paul2009-05-011-1/+1
|
* r300: Increase reference count of texture objects referenced by current state.Michel Dänzer2009-04-304-9/+11
| | | | | | | Fixes a use-after-free reported in http://bugs.freedesktop.org/show_bug.cgi?id=20539, so this possibly fixes that bug. It has been confirmed to fix http://bugs.freedesktop.org/show_bug.cgi?id=17895 .
* Use variable library name in pkg-config output.Tom Fogal2009-04-292-2/+3
| | | | | | | | | | | Previously the pkg-config output files would contain e.g. `-lGL' and `-lGLU', even if the user modified their configuration to build libraries with different names. This modifies the pkg-config inputs, and corresponding makery, so that modifying the output library name will cause the appropriate updated name to appear in the pkg-config `-l' option. Signed-off-by: Dan Nicholson <[email protected]>
* mesa: added _mesa_check_soa_dependencies() functionBrian Paul2009-04-292-0/+53
| | | | | This function will check an instruction to see if there's data dependencies between the dst and src registers if executed in an SOA manner.
* mesa/st: protect internal flushes with FLUSH_CURRENTKeith Whitwell2009-04-281-1/+1
| | | | Already doing this for driver.flush()
* mesa/main: protect driver.finish with FLUSH_CURRENTKeith Whitwell2009-04-281-0/+1
| | | | Already doing this for driver.flush()
* mesa/st: remove duplicate offset calculationKeith Whitwell2009-04-282-18/+1
|
* mesa/st: translate VERT_ATTRIB_GENERIC8..15 in st_translate_vertex_programKeith Whitwell2009-04-281-0/+8
| | | | It seems quake4 can hit these attributes sometimes.
* mesa/st: workaround for crashes in st_copy_texsubimageKeith Whitwell2009-04-281-0/+10
| | | | Proper fix for this hasn't been identified, but avoid crashing.
* R300: add quadpipe overridesAlex Deucher2009-04-281-4/+13
| | | | | RV410 SE chips only have 1 quadpipe. Also, handle other R300 chip with quadpipe override
* i965: avoid segfault in intel_update_renderbuffers() if using DRI1Brian Paul2009-04-281-3/+4
|
* swrast: add missing break in clamp_rect_coord_linear()Brian Paul2009-04-281-0/+1
| | | | See bug 21461.
* st: Add an st_get_current() function.Thomas Hellstrom2009-04-282-0/+8
| | | | Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* Avoid a segfault in shader compilationRobert Ellison2009-04-271-0/+6
| | | | | | | | | | If a shader reaches an out-of-memory condition while adding a new function (reallocating the function list), a segfault will occur during cleanup (because the num_functions field is non-zero, but the functions pointer is NULL). This fixes that segfault by zeroing out the num_functions field if reallocation fails.
* i965: only upload constant buffer data when we actually need the const bufferBrian Paul2009-04-276-17/+17
| | | | | | | Make the use_const_buffer field per-program and only call the code which updates the constant buffer's data if the flag is set. This should undo the perf regression from 20f3497e4b6756e330f7b3f54e8acaa1d6c92052
* mesa/st: fix incorrect face, level in compress_with_blitKeith Whitwell2009-04-271-2/+1
| | | | | | | We were incorrectly applying the destination texture face and level when requesting a transfer to the temporary texture, which has only one face and level. This would obviously cause problems uploading to compressed cube and mipmap textures.
* mesa: Call _mesa_snprintf instead of snprintf.José Fonseca2009-04-271-1/+1
| | | | snprintf not directly available on Windows.
* r300: always emit output insts after all KIL instsMaciej Cencora2009-04-272-3/+46
|
* intel: Fix more issues with the combined depth-stencil attachmentIan Romanick2009-04-241-6/+13
|
* intel: Initialize region ptr to prevent assertion in intel_region_referenceIan Romanick2009-04-241-1/+1
|
* intel / DRI2: When available, use DRI2GetBuffersWithFormatIan Romanick2009-04-242-16/+99
| | | | | | | | | | | This interface gives the driver two important features. First, it can allocate the (fake) front-buffer only when needed. Second, it can tell the buffer allocator the format of buffers being allocated. This enables support for back-buffer and depth-buffer with different bits per pixel. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: fix up error/warning/debug output newlinesBrian Paul2009-04-242-10/+27
| | | | | | | | | | As of commit 23ad86cfb91c294ce85a3116d4b825aaa3988a6e all messages go through output_if_debug(). Add new parameter to output_if_debug() to indicate whether to emit a newline. _mesa_warning() and _mesa_error() calls should not end their strings with \n. _mesa_debug() calls should end their text with \n.
* i965: use drm_intel_gem_bo_map/unmap_gtt() when possible, otherwise ↵Brian Paul2009-04-241-5/+9
| | | | | | dri_bo_subdata() This wraps up the unfinished business from commit a9a363f8298e9d534e60e3d2869f8677138a1e7e
* i965: fix point size issueRoland Scheidegger2009-04-241-1/+1
| | | | | need to clamp point size to user set min/max values, even for constant point size. Fixes glean pointAtten test.
* mesa: more informative error messagesBrian Paul2009-04-231-6/+10
|
* i965: revert part of commit 4f4907d69f9020ce17aef21b6431d2dd65e01982Brian Paul2009-04-231-2/+2
| | | | | | | | | | | The drm_intel_gem_bo_map_gtt() call that replaced dri_bo_map() is producing errors like: intel_bufmgr_gem.c:689: Error preparing buffer map 39 (vp_const_buffer): Invalid argument . and returning NULL, causing a segfault in the memcpy(). Just reverting until we can get to the root issue...
* i915: fix fix for anisotropic filteringRoland Scheidegger2009-04-231-2/+7
| | | | forgot to commit the changes to actually support 4x aniso filtering...
* i965: Support drawing to FBO cube faces other than positive X.Eric Anholt2009-04-231-7/+11
| | | | Also fixes drawing to 3D texture depth levels.
* intel: Take advantage of GL_READ_ONLY_ARB to map to GEM bo_map write flag.Eric Anholt2009-04-232-5/+4
| | | | | This is a CPU win in general, but in particular reduces the pain of Mesa's calculation of min/max indices in DrawElements (wtf?).
* mesa: minor state-update changes in histogram codeBrian Paul2009-04-221-5/+2
| | | | | Call FLUSH_VERTICES() in _mesa_Histogram(). No need to signal _NEW_PIXEL in ResetHistogram(), ResetMinmax().
* mesa: fix comment typoBrian Paul2009-04-221-1/+1
|