summaryrefslogtreecommitdiff
path: root/src/mesa/main
AgeCommit message (Collapse)Author
2010-02-18Revert "Nasty workaround for apparent GCC bug"Thomas White
An improved workaround has now been committed. This reverts commit 692fd8a500e0f9eadc703b29b0c7550f57863e29.
2010-02-18Nasty workaround for apparent GCC bugThomas White
This is a horrible workaround for what I think must be a GCC bug. Remove that usleep(1), or go back to the original CLAMP() macro, and glxdemo will have a white background instead of a grey one. That is to say, the value 0.5 is getting clamped to 1.0 because of some underlying floating-point weirdness. This happens when cross-compiling for armv4t-angstrom-linux-gnueabi with GCC version 4.1.1 or 4.3.2.
2010-02-16mesa: Lock mutex around _mesa_HashLookup linked list chase.Brian Paul
Remove const qualifier from _mesa_HashLookup() table parameter to avoid LOCK/UNLOCK warnings in the function body. Signed-off-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 3094adb3caeb90124359db2356df3bf8ee94800a)
2010-02-16mesa: Test for failed malloc in _mesa_HashInsert.Brian Paul
Signed-off-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 7c7247ddbf6e3f7f93e44c1cb52490044f1a2215)
2010-02-14mesa: Don't pass paramter to __builtin_clz which would hve undefined result.Pauli Nieminen
__builtin_clz with parameter 0 has undefined value. When using -O3 optimizing this would result to too large next power of two value. Fix is to check if passed value is 1 and modify formula for that case.
2010-02-13mesa: Fix compiler warningsKarl Schultz
Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
2010-02-13mesa: enable GL_ARB_fragment_coord_conventions for sw driversBrian Paul
This extension is now implemented in the GLSL compiler so it can be enabled by other drivers where applicable.
2010-02-13mesa: Export GL_EXT_texture_cube_map.José Fonseca
Still used by some applications.
2010-02-13mesa: s/abort/sys.exit/Vinson Lee
Python does not have the function abort.
2010-02-12mesa: Remove unnecessary header.Vinson Lee
2010-02-11main: Fix compiler warning. No need to convert/store depthScale as GLfloat ↵Karl Schultz
just to convert it back to GLuint to call unpack_depth_span. Also removes a difference between the 24/8 and 8/24 texstore routines.
2010-02-11mesa: additional constant/limit assertionsBrian Paul
2010-02-09mesa: move all limit/constant assertions into check_context_limits()Brian Paul
2010-02-09Merge branch 'gallium-nopointsizeminmax'Roland Scheidegger
Conflicts: src/gallium/drivers/nv10/nv10_state.c src/gallium/drivers/nv20/nv20_state.c src/gallium/drivers/nv50/nv50_program.c
2010-02-09Retire miniglx and move the actual glx code up to src/glxKristian Høgsberg
2010-02-09mesa: add back-door support for cylindrical texture wrap modeBrian Paul
If the texture priority field is 0.125 set the PROG_PARAM_BIT_CYL_WRAP flag. The gallium state tracker will look for this flag. This feature is only for testing purposes and may be remove at some point. But if it's useful we could write a GL/Mesa extension to expose it properly.
2010-02-09mesa: Enable true refcounting for NullBufferObj.Michal Krol
This object can be shared with another context, so we cannot just delete it when the owning context is being destroyed. Ensuring that buffer objects are properly refcounted guarantees NullBufferObj is destroyed when all references to it are removed.
2010-02-09mesa: Protect buffer objects reference counting with a mutex.Michal Krol
2010-02-09mesa: Fix null buffer object reference counting.José Fonseca
Always use _mesa_reference_buffer_object, and never call ctx->Driver.DeleteBuffer() directly to prevent dangling pointers to the null buffer object. This fixes crash/assertions in sharedtex_mt and Autodesk Mudbox.
2010-02-09mesa: Always do proper ref counting of shared state.José Fonseca
2010-02-07mesa: Fix mesa_next_pow_two to return same value if parameter is pow2.Pauli Nieminen
Without subtracting one pow2 value would be rounded up to next pow2 which is not correct behaviour for the function.
2010-02-06mesa/main: Add function to find next higher power of two.Pauli Nieminen
With gcc implementation uses __builtin_clr which counts number of leading zeros. Fallback implementation uses bit manipulation. First it duplicates the highest bit to all lower bits and then adds one to get the power of two number.
2010-02-04mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul
GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
2010-02-04gallium: add point size clamp to implementation limits in vertex shaderRoland Scheidegger
The point size min/max registers (unused by mesa state tracker) were removed since most hardware couldn't do much with them. However, we don't want to have to rely on hw to do point size clamping correctly to implementation dependent limits, hence have to do that in the vertex shader. This should also solve a potential problem with (non-AA) points smaller than 1.0 which according to OGL still have size 1.0. Note that OGL point rendering is odd, in particular point sprites are rasterized differently to points. Some hardware might support those different modes, but in any case the different clamping values used for smooth/multisampled/sprite enabled points might help a bit for hw which rasterizes points the same as point sprites. Also tweak mesa's ff to vertex shader translation so don't have to clamp twice in case of point attenuation.
2010-02-03mesa: increase number of texture units to MAX_COMBINED_TEXTURE_IMAGE_UNITSBrian Paul
We were misinterpretting GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS previously. It's the number of texture units for which we need to keep state; not just the total number of texture units addressable by the vertex shader plus fragment shader. Since sw Mesa independently supports 16 texture units in vertex shaders and 16 texture units in fragment shaders, the max combined units is 32. Note that the docs for glActiveTexture() indicate the max legal unit is MAX(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_COORDS) - 1. A new piglit test (texunits.c) tests the various texture unit limits. I'm pretty sure I've got this all right now, but additional reviews are welcome...
2010-02-03mesa: re-dimension RasterTexCoords and CoordReplaceBrian Paul
These are limited to the number of texture coordinate units.
2010-02-03mesa: added texcoord unit assertionBrian Paul
2010-02-03mesa: use Elements() instead of MAX_TEXTURE_COORD_UNITSBrian Paul
2010-02-03mesa: added tex unit assert, use Elements() macroBrian Paul
2010-02-03mesa: check for invalid texture coord unit in glGet queriesBrian Paul
2010-02-03mesa: add error check for querying invalid texture matrixBrian Paul
2010-02-03mesa: use Elements() as limit in loops over texture/program matrix stacksBrian Paul
2010-02-03mesa: add out of bounds assertions for accessing texture matrix stackBrian Paul
2010-02-03mesa: Factor out the fb initialization details from _mesa_new_framebuffer.Francisco Jerez
This should make things easier for drivers wanting to work with a "subclass" of gl_framebuffer. The complementary "_mesa_initialize_framebuffer" function is now called "_mesa_initialize_window_framebuffer" for the sake of symmetry. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-02mesa: Add a BITSET_FFS function.Francisco Jerez
It will be useful for the nouveau DRI driver and IMHO there's no reason to keep it private. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-01mesa: Remove unnecessary headers.Vinson Lee
2010-01-31mesa: Remove unnecessary headers.Vinson Lee
2010-01-29Merge commit 'lb2/arb_fragment_coord_conventions'Keith Whitwell
2010-01-29mesa: do state validation in _mesa_valid_to_render()Brian Paul
...rather than checking/validating before all the calls to _mesa_valid_to_render() and valid_to_render(). The next patch will actually fix some bugs... (cherry picked from commit 23eda89ec89e2bd5bc26077bd56e8d6b5d4040d4)
2010-01-29mesa: don't expose GL_ARB_fragment_coord_conventions until the GLSL part is doneLuca Barbieri
Exposing it was incorrect, as the GLSL part of the extension is missing. We still keep the ARB_fragment_coord_conventions field, so that the ARBfp parser can know whether to accept or reject the keywords.
2010-01-27mesa: fix double->float assignment warningsBrian Paul
Reported by Karl Schultz.
2010-01-27mesa: fix int/uint comparison warningsBrian Paul
Reported by Karl Schultz.
2010-01-27mesa: more info in glActiveTexture error msgBrian Paul
2010-01-26Merge branch 'mesa_7_7_branch'Brian Paul
Merging was easier than cherry picking in this instance.
2010-01-26mesa: Don't bind DRAW/READ_FRAMEBUFFER separately without FBO blit supportErik Wien
If GL_EXT_framebuffer_blit was not supported _mesa_DeleteFramebuffersEXT would raise an error when deleting the currently bound framebuffer. This because it tried to bind the default DRAW- and READ_FRAMEBUFFER separately. This patch binds the default FRAMEBUFFER instead in that case. Encountered in the fbo/fbo-copyteximage piglit test on R600. Patch cleaned up a bit by Brian Paul.
2010-01-26mesa: remove redundant _MaxElement computationBrian Paul
Eric added some new code to check if offset < obj_size before computing _MaxElement but my original code was still present afterward and it clobbered the _MaxElement value. Not sure if this came from a bad merge or what.
2010-01-25Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/intel/intel_screen.c src/mesa/drivers/dri/intel/intel_swapbuffers.c src/mesa/drivers/dri/r300/r300_emit.c src/mesa/drivers/dri/r300/r300_ioctl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-24mesa: move _mesa_debug() call earlier in _mesa_ScissorBrian Paul
Part of a patch from Xavier Chantry <chantry.xavier@gmail.com>
2010-01-23Merge branch 'arb_half_float_vertex'Dave Airlie
2010-01-23mesa: add core support for ARB_half_float_vertex.Dave Airlie
Adds the extension to the list + support to the APIs. also add t_draw.c support to convert for sw rast. Signed-off-by: Dave Airlie <airlied@redhat.com>