summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove unused _mesa_init_teximage_fields() target parameterBrian Paul2012-01-045-13/+12
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* ff_fragment_shader: Don't generate swizzles for scalar combiner inputsIan Romanick2012-01-031-6/+10
| | | | | | | | | | | There are a couple scenarios where the source could be zero and the operand could be either SRC_ALPHA or ONE_MINUS_SRC_ALPHA. For example, if the source was ZERO. This would result in something like (0).w, and a later call to ir_validate would get angry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42517
* mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functionsBrian Paul2012-01-025-303/+109
| | | | | | | | The were always zero. When doing a sub-texture replacement we account for the dstX/Y/Zoffsets when we map the texture image. So no need to pass them into the texstore code anymore. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: simplify Driver.GetCompressedTexImage() parametersBrian Paul2011-12-303-14/+10
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.CompressedTex[Sub]Image function parametersBrian Paul2011-12-304-154/+86
| | | | | | | | As with previous commits, the target, level and texObj info can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-305-62/+49
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexSubImage() parametersBrian Paul2011-12-305-59/+47
| | | | | | | | There's no need to pass the target, level and texObj parameters since they can be easily obtained from the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Use __builtin_ffsll on Mac OS X.Vinson Lee2011-12-281-1/+1
| | | | | | | | | Fixes this GCC warning. arrayobj.c: In function '_mesa_update_array_object_max_element': arrayobj.c:310: warning: implicit declaration of function 'ffsll' Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Re-add main/bitset.h to fix classic nouveau build failure.José Fonseca2011-12-281-0/+160
| | | | | | | | bitset.h is still used by classic nouveau -- see `git grep '\<BITSET_'` -- and the state stored is too big to fit in 64bit integers (it requires approximately 87 bits), so there is no obvious alternative here. This effecively reverts commit 196800d79829a420073f762fac90090a7b416d2d.
* mesa: Remove now unused main/bitset.h.Mathias Fröhlich2011-12-281-160/+0
| | | | Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Remove remaining FEATURE_ARB_vertex_buffer_object guards.Mathias Fröhlich2011-12-286-21/+0
| | | | | | | | | Since commit 82b9661894315362f857192439bdcbc9db090387 and 34eae1c72a9b3a8eb0634cda52fca0208cd2f40d vbo support is mandatory for all drivers. So, remove the remaining FEATURE_ARB_vertex_buffer_object guards. Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Convert RENDERINPUTS* macros to GLbitfield64.Mathias Fröhlich2011-12-281-0/+6
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fpclassify is available on HaikuAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix signed/unsigned comparison warningsBrian Paul2011-12-261-2/+2
|
* mesa: remove leftovers from color indexed rendering.Mathias Fröhlich2011-12-261-2/+0
| | | | | | | | | Remove gl_light::_dli and gl_light::_sli. Both are only used for a value previously used in color indexed rendering. Also both variables are only used and never written. Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: remove unused _mesa_copy_materials.Mathias Fröhlich2011-12-262-20/+0
| | | | Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: consolidate texstore functionsBrian Paul2011-12-241-331/+153
| | | | | | | | | The code for storing 1D, 2D and 3D tex images (whole or sub-images) was all pretty similar. This consolidates those six paths. v2: rework switch statement to catch unexpected targets Reviewed-by: José Fonseca <[email protected]>
* mesa: fix _mesa_store_texsubimage2d() for GL_TEXTURE_1D_ARRAYBrian Paul2011-12-241-23/+44
| | | | | | | For 1D arrays, map each slice separately. Note that this was handled correctly in _mesa_store_teximage2d() but not here. Reviewed-by: José Fonseca <[email protected]>
* mesa: update comment for MapTextureImage()Brian Paul2011-12-241-0/+2
|
* mesa: remove gl_renderbuffer::PutRowRGB()Brian Paul2011-12-242-10/+0
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove gl_renderbufer::PutMonoRow() and PutMonoValues()Brian Paul2011-12-242-14/+0
| | | | | | | The former was only used for clearing buffers. The later wasn't used anywhere! Remove them and all implementations of those functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: add _mesa_pack_colormask()Brian Paul2011-12-242-0/+78
| | | | | | For generating bit-wise colormasks for arbitrary pixel formats. Reviewed-by: José Fonseca <[email protected]>
* mesa: add _mesa_get_format_max_bits()Brian Paul2011-12-242-0/+19
| | | | | | Returns max bits per channel for the given format. Reviewed-by: José Fonseca <[email protected]>
* mesa: split get_tex_rgba() into compressed/uncompressed versionsBrian Paul2011-12-241-145/+175
| | | | | | | This just splits one big function into two smaller ones for better readability. Reviewed-by: José Fonseca <[email protected]>
* mesa: fix comments in getteximage_error_check()Brian Paul2011-12-241-2/+2
|
* mesa: move the format and type check before select_tex_image()Jian Zhao2011-12-241-6/+6
| | | | | | | | | | Move the format and type check before select_tex_image, or it will fail to report the mismatch error if the teximage is null. Reported-by: Anuj Phogat <[email protected]> Signed-off-by: Jian Zhao <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: Disable certain error checks when transform feedback is pausedPaul Berry2011-12-232-3/+5
| | | | | | | | | | When transform feedback is paused, it is legal to change programs or to perform drawing operations using a drawing mode that doesn't match the transform feedback mode. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Ensure that Paused is reset to false on EndTransformFeedback.Paul Berry2011-12-231-0/+1
| | | | | | | | | | | | If a client calls BeginTransformFeedback(), then PauseTransformFeedback(), then EndTransformFeedback(), we need to make sure that the transform feedback object is not left in a "paused" state, otherwise the next call to BeginTransformFeedback() will leave transform feedback paused. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* format_unpack: add 8/16 rgba/rgb types.Dave Airlie2011-12-221-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 <[email protected]>
* mesa: Add _NEW_RASTERIZER_DISCARD as synonym for _NEW_TRANSFORM.Paul Berry2011-12-212-1/+7
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry2011-12-216-17/+17
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove unnecessary FLUSH_VERTICES in bind_buffer_rangePaul Berry2011-12-201-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 <[email protected]>
* mesa: Fix off-by-one error in transform feedback size check.Paul Berry2011-12-201-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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Record transform feedback strides/offsets in linker output.Paul Berry2011-12-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Fix compilation on cygwin after commit 762c9766c93697af8d7fbaa729aed118789dbe8eJon TURNEY2011-12-201-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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix a leak in _mesa_delete_texture_image()Pekka Paalanen2011-12-201-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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: make _mesa_set_tex_image() static since it's not called anywhere elseBrian Paul2011-12-182-13/+7
|
* mesa: new _mesa_prepare_mipmap_level() function for mipmap generationBrian Paul2011-12-162-33/+101
| | | | | | | | | | | | | | | | This helper function is used during mipmap generation to prepare space for the destination mipmap levels. This improves/fixes two things: 1. If the texture object was created with glTexStorage2D, calling _mesa_TexImage2D() to allocate the new image would generate INVALID_OPERATION since the texture is marked as immutable. 2. _mesa_TexImage2D() always frees any existing texture image memory before allocating new memory. That's inefficient if the existing image is the right size already. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: make update_fbo_texture() non-staticBrian Paul2011-12-162-5/+10
| | | | | | | We'll call this from the mipmap generation code. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: whitespace and comment fixes in fbobject.cBrian Paul2011-12-161-9/+11
|
* mesa: add MESA_FORMAT_RGB565[_REV] as candidates for GL_R3_G3_B2Brian Paul2011-12-161-0/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add a few comments for the z unpacking functionsBrian Paul2011-12-161-0/+8
|
* Enabling display list support for glClearBuffer functions with minor fixesAnuj Phogat2011-12-151-11/+11
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-158-60/+64
| | | | | | | | | | | | | | It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func.
* Add mismatch check for glGetTexImage or it will return -1 and may lead to ↵Jian Zhao2011-12-141-0/+8
| | | | | | segment fault. Reviewed-by: Brian Paul <[email protected]>
* Regenerate files from previous commitsIan Romanick2011-12-132-2049/+2049
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* mesa: add const flags to skip MaxVarying and MaxUniform linker checks (v2)Marek Olšák2011-12-131-0/+9
| | | | | | | | | This is only temporary until a better solution is available. v2: print warnings and add gallium CAPs Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: update comments for _DepthBuffer, _StencilBuffer fieldsBrian Paul2011-12-131-2/+3
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _DepthBuffer, _StencilBuffer resize codeBrian Paul2011-12-131-18/+0
| | | | | | This is handled in swrast now when we validate the framebuffer state. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused depthstencil.[ch] filesBrian Paul2011-12-132-1072/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>