summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/common
AgeCommit message (Collapse)Author
2011-02-28mesa: move PBO-related functions into a new fileBrian Paul
2011-01-24mesa: plug in fallback function for ctx->Driver.ValidateFramebuffer()Brian Paul
The software renderer doesn't support GL_ALPHA, GL_LUMINANCE, etc so we should report GL_FRAMEBUFFER_UNSUPPORTED during FBO validation.
2011-01-15mesa: begin implementation of GL_ARB_draw_buffers_blendBrian Paul
2011-01-12meta: Actually use mipmapping when generating mipmaps.Eric Anholt
With the change to not reset baselevel, this GL_LINEAR filtering was resulting in generating mipmaps off of the base level instead of the next higher detail level. Fixes fbo-generatemipmap-filtering. Reported by: Neil Roberts <neil@linux.intel.com>
2011-01-10meta: Don't tweak BaseLevel when doing glGenerateMipmap().Eric Anholt
We don't need to worry about levels other than MaxLevel because we're minifying -- the lower levels (higher detail) won't contribute to the result. By changing BaseLevel, we forced hardware that doesn't support BaseLevel != 0 to relayout the texture object.
2010-12-10mesa/meta: fix broken assertion, rename stack depth varBrian Paul
assert(current_save_state < MAX_META_OPS_DEPTH) did not compile. Rename current_save_state to SaveStackDepth to be more consistent with the style of the other fields.
2010-12-10meta: allow nested meta operationsXiang, Haihao
_mesa_meta_CopyPixels results in nested meta operations on Sandybridge. Previoulsy the second meta operation overrides all states saved by the first meta function.
2010-11-24meta: Mask Stencil.Clear against stencilMax in _mesa_meta_ClearPeter Clifton
This fixes incorrect behaviour when the stencil clear value exceeds the size of the stencil buffer, for example, when set with: glClearStencil (~1); /* Set a bit pattern of 111...11111110 */ glClear (GL_STENCIL_BUFFER_BIT); The clear value needs to be masked by the value 2^m - 1, where m is the number of bits in the stencil buffer. Previously, we passed the value masked with 0x7fffffff to _mesa_StencilFuncSeparate which then clamps, NOT masks the value to the range 0 to 2^m - 1. The result would be clearing the stencil buffer to 0xff, rather than 0xfe. Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-18mesa: pass gl_format to _mesa_init_teximage_fields()Brian Paul
This should prevent the field going unset in the future. See bug http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background. Also remove unneeded calls to clear_teximage_fields(). Finally, call _mesa_set_fetch_functions() from the _mesa_init_teximage_fields() function so callers have one less thing to worry about.
2010-11-10meta: Handle bitmaps with alpha test enabled.Francisco Jerez
Acked-by: Brian Paul <brianp@vmware.com>
2010-11-06meta: Don't try to disable cube maps if the driver doesn't expose the extension.Francisco Jerez
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-04meta: Fix incorrect rendering of the bitmap alpha component.Francisco Jerez
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-04meta: Don't leak alpha function/reference value changes.Francisco Jerez
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-10-29mesa: Make metaops use program refcounts instead of names.Eric Anholt
Fixes failure on restoring state when the program was active but deleted, and the name no longer exists. Bug #31194
2010-10-27Track separate programs for each stageIan Romanick
The assumption is that all stages are the same program or that varyings are passed between stages using built-in varyings.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-09-23mesa: Remove EXT_convolution.Eric Anholt
More optional code.
2010-09-16meta: Don't bind the created texture object in init_temp_texture().Francisco Jerez
This function is executed outside _mesa_meta_begin/end(), that means that e.g. _mesa_meta_Bitmap() clobbers the texturing state because it changes the currently active texture object. There's no need to bind the new texture when it's created, it's done again later anyway (from setup_drawpix/copypix_texture()). Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-14mesa: Remove unnecessary FEATURE tests.Chia-I Wu
Remove all FEATURE tests in mesa/drivers/common/. They are not needed and the code looks better without them.
2010-07-20mesa: call ctx->Driver.ChooseTextureFormat() only when necessary.Brian Paul
When defining mipmap level 'L' and level L-1 exists and the new level's internalFormat matches level L-1's internalFormat, then use the same hw format. Otherwise, do the regular ctx->Driver.ChooseTextureFormat() call. This avoids a problem where we end up choosing different hw formats for different mipmap levels depending on how the levels are defined (glTexImage vs. glCopyTexImage vs. glGenerateMipmap, etc). The root problem is the ChooseTextureFormat() implementation in some drivers uses the user's glTexImage format/type parameters in the choosing heuristic. Later mipmap levels might be generated with different calls (ex: glCopyTexImage()) so we don't always have format/type info and the driver may choose a different format. For more background info see the July 2010 mesa-dev thread "Bug in _mesa_meta_GenerateMipmap"
2010-06-23Merge branch 'shader-file-reorg'Brian Paul
1. Move all GL entrypoint functions and files into src/mesa/main/ This includes the ARB vp/vp, NV vp/fp, ATI fragshader and GLSL bits that were in src/mesa/shader/ 2. Move src/mesa/shader/slang/ to src/mesa/slang/ to reduce the tree depth 3. Rename src/mesa/shader/ to src/mesa/program/ since all the remaining files are concerned with GPU programs. 4. Misc code refactoring. In particular, I got rid of most of the GLSL-related ctx->Driver hook functions. None of the drivers used them. Conflicts: src/mesa/drivers/dri/i965/brw_context.c
2010-06-19Revert "Fix image_matches_texture_obj() MaxLevel check"Will Dyson
This reverts commit a9ee95651131e27d5acf3d10909b5b7e5c8d3e92. It was based on a failure to understand how ther driver allocates memory, and causes a regression with Celestia. Set MaxLevel to dstLevel before allocating new mipmap level. The radeon driver will fail to allocate space for a new level that is outside of BaseLevel..MaxLevel. Set MaxLevel before allocating. Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-06-10mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul
2010-06-10mesa: move arbprogram.[ch] to main/Brian Paul
2010-06-10mesa: refactor shader api / object codeBrian Paul
Remove the unneeded ctx->Driver hooks for shader-related functions. Move state and API-related things into main/.
2010-05-24meta: Convert Z value from normalized to object-space in meta codeBrian Paul
Convert Z from a normalized value in the range [0, 1] to an object-space Z coordinate in [-1, +1] so that drawing at the new Z position with the default/identity ortho projection results in the original Z value. Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z value comes from the clear value or raster position. Fixes piglit tests fdo23670-depth_test, quad-invariance and glsl-orangebook-ch06-bump as well as oglc zbfunc.c. https://bugs.freedesktop.org/show_bug.cgi?id=23670
2010-05-10mesa: more transform feedback infrastructureBrian Paul
Includes GL_ARB_transform_feedback2 which encapsulates transform feedback state in objects.
2010-05-07mesa: remove driver hooks for GetFloat/Integer/Doublev, etcBrian Paul
Once upon a time some drivers hooked into these for GL_HP_occlusion_test and GL_OES_read_format. They're not being used anymore so get rid of them.
2010-04-27Disable scissor when begining meta operationsPierre Willenbrock
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-04-27Don't set srcLevel on GL_TEXTURE_RECTANGLE_ARB targetsPierre Willenbrock
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-03-16meta: Fix up restoration of state if _mesa_map_pbo_source() fails.Eric Anholt
2010-03-16meta: Properly refcount our saved programs and texobjs.Eric Anholt
Found while debugging bug #24119.
2010-03-05meta: Use the DrawBuffer's stencil sizeIan Romanick
Previously the code was erroneously using the stencil size of the context instead of the stencil size of the DrawBuffer. With FBOs these may be different. As a result, clearing the stencil buffer of an FBO bound to a context that doesn't have stencil would fail. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03mesa: Remove ClearIndex and IndexMask from device-driver interfaceIan Romanick
These are used to inform the driver of the clear value for color-index buffers and to control write-masking of bits in color-index buffers. No driver use or need (not even Nouveau) these interfaces. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-02-24mesa: disable unreachable meta mipmap gen codeBrian Paul
More work is needed to support 3D mipmap generation. Disable unreachable code until then. See bug 26722.
2010-02-19mesa: restore _mesa_snprintf() - it's needed for WindowsBrian Paul
This reverts part of commit 298be2b028263b2c343a707662c6fbfa18293cb2
2010-02-19Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
2010-02-19mesa: replace _mesa_bzero() with memset()Brian Paul
2010-02-19Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-12mesa: Remove unnecessary headers.Vinson Lee
2010-01-08Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/i965/brw_wm_emit.c
2010-01-06meta: remove F suffix from _mesa_Ortho() paramsBrian Paul
_mesa_Ortho() takes GLdoubles.
2010-01-06meta: move destination vertex/projection setup out of _mesa_meta_GenerateMipmapBrian Paul
Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
2010-01-06meta: set viewport and projection matrix in _mesa_meta_GenerateMipmapBrian Paul
This fixes mipmap levels being clipped to the last viewport. Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
2010-01-03mesa: fix blend enable/disable calls in meta.c codeFrancis Galiegue
Fixes regression in some DRI drivers since the GL_EXT_draw_buffers2 changes. Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-29mesa: implement per-buffer color maskingBrian Paul
This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0. The ctx->Color.ColorMask field is now a 2-D array. Until drivers are modified to support per-buffer color masking, they can just look at the 0th color mask. The new _mesa_ColorMaskIndexed() function will be called by glColorMaskIndexedEXT() or glColorMaski().
2009-12-29mesa: per-buffer blend enabled flagsBrian Paul
ctx->Color.BlendEnabled is now a GLbitfield instead of a GLboolean to indicate blend on/off status for each color/draw buffer. This is infrastructure for GL_EXT_draw_buffers2 and OpenGL 3.x New functions include _mesa_EnableIndexed(), _mesa_DisableIndexed(), and _mesa_IsEnabledIndexed(). The enable function corresponds to glEnableIndexedEXT() for GL_EXT_draw_buffers2 or glEnablei() for GL3. Note that there's quite a few tests for ctx->Color.BlendEnabled != 0 in drivers, etc. Those tests can remain as-is since the mask will be 0 or ~0 unless GL_EXT_draw_buffers2 is enabled.
2009-12-21Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/main/version.h src/mesa/state_tracker/st_atom_shader.c
2009-12-11mesa: remove unused ctx->Driver.ActiveTexture() hookBrian Paul