summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: remove TexSubImage code, use core mesa routines instead.Brian Paul2011-12-301-140/+3
| | | | | | | | Since the move to Map/UnmapTextureImage, the core mesa routines are equivalent to what the state tracker was doing. The TexImage functions can be replaced too, but there's a few differences that will need to be handled.
* u_format: fix inv_swizzles generationDave Airlie2011-12-301-1/+2
| | | | | | | | | | | | inv_swizzles is used in lp_tile_soa.py to create lp_tile_soa.c, we overwrite swizzles if they are already set. This results in the i8 format getting alpha instead of red, and the l8 format getting blue instead of red. Fixes fbo-alphatest-formats, fbo-alphatest-formats ARB_texture_float, and fbo-alphatest-formats EXT_texture_snorm on llvmpipe. Signed-off-by: Dave Airlie <[email protected]>
* r600g: Manage fences per screen rather than per context.Michel Dänzer2011-12-302-56/+65
| | | | | | | | | | | | | | | | A fence is a screen object and can outlive the context it was created from. The previous code would access freed memory in that case, resulting in various problems. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44151 https://bugs.freedesktop.org/show_bug.cgi?id=44007 Probably fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43993 NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* i915g: Allocate tmp for KILPStéphane Marchesin2011-12-301-0/+2
| | | | This fixes https://bugs.freedesktop.org/show_bug.cgi?id=44297
* vbo: introduce vbo_sizeof_ib_type() functionYuanhan Liu2011-12-305-79/+29
| | | | | | | | | | introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib->type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* llvmpipe: Remove useless draw_install_pstipple_stage call.Stéphane Marchesin2011-12-291-5/+0
| | | | | | It is #ifdef'd out, and is already called unconditionnaly a couple lines above. Reviewed-By: Jose Fonseca <[email protected]>
* intel: Fix memory leak in intel_miptree_create()Chad Versace2011-12-291-2/+2
| | | | | | | | On failure, intel_miptree_create() needs to *release* the miptree, not just free it, so that the stencil_mt gets released too. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965/fs: Allow constant propagation into IF with embedded compare.Eric Anholt2011-12-291-0/+1
| | | | | | This saves a couple of instructions on most programs with control flow. More interestingly, 6 shaders from unigine sanctuary now fit into 16-wide without register spilling.
* intel: Drop the batchbuffer flush on glRenderbufferStorage().Eric Anholt2011-12-291-2/+0
| | | | | There's nothing batchbuffer-related here. State updates by the caller will trigger re-emitting of any new hardware state.
* intel: Drop the batchbuffer flush on glFramebufferRenderbuffer().Eric Anholt2011-12-291-2/+0
| | | | | There should be nothing special about this call compared to other callers of intel_draw_buffer().
* intel: Make the batchbuffer flush debug more useful.Eric Anholt2011-12-292-3/+5
| | | | | | | We were printing out the line triggering the flush, but a variety of different causes just printed the line number for intel_flush()'s call of intel_batchbuffer_flush(). Plumb the line numbers from the caller of intel_flush() on through.
* intel: Fix performance regression in Lightsmark since HiZ changes.Eric Anholt2011-12-291-0/+3
| | | | | | | | | | | Since the refactor in d7b33309fe160212f2eb73f471f3aedcb5d0b5c1, depth in the miptree changed from 1 to 6, so we always decided it didn't match, and we would relayout to something that would still not "match". Improves performance 23.8% (+/- 1.1%, n=4) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43329
* intel: Don't consider miptrees for other texture targets to match.Eric Anholt2011-12-292-1/+3
| | | | | We would have done a relayout at validate time, but it's senseless to store into a miptree if it's going to force relayout.
* 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]>
* i915g: Add missing draw_flush call.Stéphane Marchesin2011-12-281-0/+7
| | | | Fixes a bunch of corruption bugs, especially some missing clipped triangles.
* mesa: Re-add main/bitset.h to fix classic nouveau build failure.José Fonseca2011-12-282-0/+162
| | | | | | | | 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-282-162/+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 to use GLbitfield64 directly.Mathias Fröhlich2011-12-284-42/+24
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon: Convert to use GLbitfield64 directly.Mathias Fröhlich2011-12-283-38/+37
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nouveau: Convert to use GLbitfield64 directly.Mathias Fröhlich2011-12-282-2/+2
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i915: Convert to use GLbitfield64 directly.Mathias Fröhlich2011-12-282-14/+12
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Convert RENDERINPUTS* macros to GLbitfield64.Mathias Fröhlich2011-12-282-12/+20
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i915g: Only apply the optimization to output vars.Stéphane Marchesin2011-12-271-0/+1
| | | | | This is a bit overkill, but otherwise we need to rename subsequent uses, which is a future TODO. Reported by CME.
* i965/vs: Properly clear cur_value when propagating direct copies.Kenneth Graunke2011-12-271-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | Consider the following code: MOV A.x, B.x MOV B.x, C.x After the first line, cur_value[A][0] == B, indicating that A.x's current value came from register B. When processing the second line, we update cur_value[B][0] to C. However, for drect copies, we fail to reset cur_value[A][0] to NULL. This is necessary because the value of A is no longer the value of B. Fixes Counter-Strike: Source in Wine (where the menu rendered completely black in DX9 mode), completely white textures in Civilization V, and the new Piglit test glsl-vs-copy-propagation-1.shader_test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42032 Tested-by: Matt Turner <[email protected]> Tested-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965/vs: Fix incorrect subscript when resetting copy propagation records.Kenneth Graunke2011-12-271-1/+1
| | | | | | | | | | | | | | | | In this code, 'i' loops over the number of virtual GRFs, while 'j' loops over the number of vector components (0 <= j <= 3). It can't possibly be correct to see if bit 'i' is set in the destination writemask, as it will have values much larger than 3. Clearly this is supposed to be 'j'. Found by inspection. Tested-by: Matt Turner <[email protected]> Tested-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Create mock implementation of GL_OES_EGL_image_externalChad Versace2011-12-274-0/+6
| | | | | | | | | | | | | | | | | | | | | In Android IceCreamSandwich, SurfaceFlinger requires GL_OES_image_external for basic compositing tasks. Without the extension, SurfaceFlinger fails to start. Despite the incompleteness of the extension's implementation introduced by this patch, it is good enough to enable SurfaceFlinger and to unblock the people who need to begin testing Mesa on IceCreamSandwich. To enable the extension, set the environment variable MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external". Ideally, Android should set this in init.rc. WARNING: This implementation of GL_OES_EGL_image_external is not complete. Some of it is even incorrect. When we begin to really implement GL_OES_EGL_image_external, much of the patch will need reverting. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* meta: Disable GL_TEXTURE_EXTERNAL_OES in meta_begin()Chad Versace2011-12-271-0/+2
| | | | | | | | If the meta flag MESA_META_TEXTURE is present, then disable the texture target GL_TEXTURE_EXTERNAL_OES. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mklib: tab cleanup, no functional changeAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-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]>
* glu: remove BeOS define as BeOS is not longer a target platformAlexander von Gluck2011-12-271-6/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under HaikuAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallium/u_pack: fix l8/i8 pack color ubDave Airlie2011-12-271-1/+1
| | | | | | | just noticed this in passing, not sure it actually fixes any issus. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vbo: Clean up recalculate_input_bindings.Mathias Fröhlich2011-12-272-46/+17
| | | | | | | | | Now the gl_array_object's layout matches the one used in recalculate_input_bindings. Make use of this and remove the bind_array_obj function. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mklib: Add Haiku build supportAlexander von Gluck2011-12-261-0/+37
| | | | Signed-off-by: Brian Paul <[email protected]>
* Fix build with LLVM >= r145623.Johannes Obermayr2011-12-261-1/+1
| | | | | | | | | This is a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=43861. Actually the issue which makes -pedantic failing should be solved. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* swrast: assert _swrast_map_teximage() x, y is multiple of block sizeBrian Paul2011-12-261-0/+3
|
* swrast: replace assertion with conditional in _swrast_map_teximage()Brian Paul2011-12-261-2/+6
| | | | | Just in case we ran out of memory when trying to allocate the texture memory.
* mesa: fix signed/unsigned comparison warningsBrian Paul2011-12-261-2/+2
|
* vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArraysBrian Paul2011-12-265-7/+49
| | | | | | | | | | | | | | | | | | | | | This fixes a regression seen with the isosurf demo when switching between glBegin/End and glDrawArrays (do it several times). The problem was the driver wasn't getting _NEW_ARRAY when the arrays were subtly changed: (vertex3f, normal3f) vs. (normal3f, vertex3f). This patch fixes that by signaling _NEW_ARRAY whenever we transition between glBegin/End and glDrawArrays mode and display lists. The patch also fixes up the initialization of the map_vp_none[] array to stop putting strange values in the last five elements of the array. v2: remove DRAW_ELEMENTS, don't distinguish between glDrawArrays and glDrawElements v3: add DRAW_DISPLAY_LIST for the display list case, just to be safe. Reviewed-by: Mathias Froehlich <[email protected]> Tested-by: Mathias Froehlich <[email protected]>
* mesa: remove leftovers from color indexed rendering.Mathias Fröhlich2011-12-262-8/+1
| | | | | | | | | 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]>
* vl: call decode_bitstream only onceChristian König2011-12-265-10/+19
| | | | | | | Submit all bitstreams at once to decode_bitstream. Signed-off-by: Christian König <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* i965: increase the brw eu instruction store size dynamicallyYuanhan Liu2011-12-263-3/+18
| | | | | | | | | | | | | | Here is the final patch to enable dynamic eu instruction store size: increase the brw eu instruction store size dynamically instead of just allocating it statically with a constant limit. This would fix something that 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would limit it to 10000'. v2: comments from ken, do not hardcode the eu limit to (1024 * 1024) Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: call next_insn() before referencing a instruction by indexYuanhan Liu2011-12-261-14/+26
| | | | | | | | | | | | | | A single next_insn may change the base address of instruction store memory(p->store), so call it first before referencing the instruction store pointer from an index. This the final prepare work to enable the dynamic store size. v2: comments from Ken, define emit_endif as bool type Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: get the jmp distance by instruction indexYuanhan Liu2011-12-264-12/+10
| | | | | | | | | | | | | If dynamic instruction store size is enabled, while after the brw_JMPI() and before the brw_land_fwd_jump() function, the eu instruction store base address(p->store) may change. Thus, the safe way to reference the jmp instruction is by index instead of by the instruction address. v2: comments from Eric, don't change the prototype of brw_JMPI Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: let the if_stack just store the instruction indexYuanhan Liu2011-12-263-10/+19
| | | | | | | | | | | | | If dynamic instruction store size is enabled, while after the brw_IF/ELSE() and before the brw_ENDIF() function, the eu instruction store base address(p->store) may change. Thus let if_stack just store the instruction index. This is somehow more flexible and safe than store the instruction memory address. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600g: fix a warning that a variable may be uninitializedMarek Olšák2011-12-251-0/+2
|
* gallium: remove PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_ATTRIBSMarek Olšák2011-12-255-6/+1
| | | | | | It's the same as PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use a cast wrapper function to get st_transform_feedback_objectMarek Olšák2011-12-251-6/+11
|