summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* st/mesa: DrawTFB should use the vertex count from the last call of EndTFBMarek Olšák2011-12-251-11/+42
| | | | | | From ARB_transform_feedback2: ... the vertex count used for the rendering operation is set by the previous EndTransformFeedback command.
* r300g: mapping buffers for read should be unsynchronizedMarek Olšák2011-12-241-1/+9
| | | | The GPU never uses them for write.
* winsys/radeon: move managing GEM domains back to driversMarek Olšák2011-12-2414-76/+106
| | | | | | | | This partially reverts commit 363ff844753c46ac9c13866627e096b091ea81f8. It caused severe performance drops in Nexuiz. Reported by Phoronix. Tested by me on r300g and by IRC people on r600g.
* i965 gen6: Fix incorrect order of dwords in gen6_update_sol_indices()Paul Berry2011-12-241-1/+1
| | | | | | | | | | | | When updating SOL indices, we were accidentally putting the starting index in dword 1 and the SVBI number to increment in dword 2--these should be reversed. Usually both of these values are zero, so we didn't see any problem. However, if a transform feedback operation spans multiple batch buffers, the starting index will be nonzero. Fixes piglit test "EXT_transform_feedback/intervening-read output". Reviewed-by: Kenneth Graunke <[email protected]>
* i965 gen6: Fix transform feedback of triangle strips.Paul Berry2011-12-242-18/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering triangle strips, vertices come down the pipeline in the order specified, even though this causes alternate triangles to have reversed winding order. For example, if the vertices are ABCDE, then the GS is invoked on triangles ABC, BCD, and CDE, even though this means that triangle BCD is in the reverse of the normal winding order. The hardware automatically flags the triangles with reversed winding order as _3DPRIM_TRISTRIP_REVERSE, so that face culling and two-sided coloring can be adjusted to account for the reversed order. In order to ensure that winding order is correct when streaming vertices out to a transform feedback buffer, we need to alter the ordering of BCD to BDC when the first provoking vertex convention is in use, and to CBD when the last provoking vertex convention is in use. To do this, we precompute an array of indices indicating where each vertex will be placed in the transform feedback buffer; normally this is SVBI[0] + (0, 1, 2), indicating that vertex order should be preserved. When the primitive type is _3DPRIM_TRISTRIP_REVERSE, we change this order to either SVBI[0] + (0, 2, 1) or SVBI[0] + (1, 0, 2), depending on the provoking vertex convention. Fixes piglit tests "EXT_transform_feedback/tessellation triangle_strip" on Gen6. Reviewed-by: Kenneth Graunke <[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
|
* swrast: rewrite glDrawPixels(GL_DEPTH) with zoomBrian Paul2011-12-243-69/+28
| | | | | | | This gets rid of another renderbuffer->PutRow() call and _DepthBuffer usage. We always work with 32-bit uint Z values now. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using _DepthBuffer in triangle codeBrian Paul2011-12-241-16/+11
| | | | | The only consequence is we can only use the occlusion_zless_16_triangle() function with MESA_FORMAT_Z16.
* mesa: remove gl_renderbuffer::PutRowRGB()Brian Paul2011-12-2414-1017/+0
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using PutRowRGB() in triangle codeBrian Paul2011-12-241-10/+12
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: refactor/rewrite fast_draw_rgba_pixels()Brian Paul2011-12-241-234/+167
| | | | | | | | | Use Map/UnmapRenderbuffer() for the special, optimized cases we care about. Note that we're dropping some seldom-used cases in the new fast-path code: as CI->RGB conversion and zooming. Reviewed-by: Eric Anholt <[email protected]>
* swrast: move swrast_render_start/finish() call in drawpixels codeBrian Paul2011-12-241-10/+24
| | | | | | | | We don't want to call these functions where we'll be using Map/UnmapRenderbuffer(). So push them further down in the drawpixels cases so that we can switch over to Map/UnmapRenderbuffer() step by step. Reviewed-by: Eric Anholt <[email protected]>
* swrast: new fast_draw_depth_stencil() for glDrawPixels(GL_DEPTH_STENCIL)Brian Paul2011-12-241-16/+40
| | | | | | | | Stop using deprecated renderbuffer PutRow() function. Note that we aren't using Map/UnmapRenderbuffer() yet because this call is inside a swrast_render_start/finish() pair. v2: use _mesa_pack_uint_24_8_depth_stencil_row(), per Eric.
* swrast: remove the copy_depth_stencil_pixels() functionBrian Paul2011-12-241-178/+3
| | | | | | | | | Hopefully glCopyPixels(GL_DEPTH_STENCIL) will be handled by the fast copy function. Otherwise, just do the copy with separate depth + stencil copies. That's effectively what the removed code did anyway. Reviewed-by: Eric Anholt <[email protected]>
* swrast: stop using depth/stencil wrappers in CopyPixels codeBrian Paul2011-12-241-8/+21
| | | | | | | | | | | The functions that read depth/stencil values understand all (packed) depth/stencil buffer formats now so there's no reason to use the wrappers. Also, improve the format checks in fast_copy_pixels() to catch mismatched depth/stencil cases. v2: fix the test for combined depth+stencil buffers, per Eric.
* swrast: remove needless assignment in draw_depth_stencil_pixels()Brian Paul2011-12-241-1/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swast: replace renderbuffer->GetPointer() with _swrast_pixel_address()Brian Paul2011-12-243-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: use _swrast_pixel_address() helper functionBrian Paul2011-12-243-32/+20
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite stencil test codeBrian Paul2011-12-241-858/+259
| | | | | | | | Stop using the deprecated renderbuffer Get/Put Row/Values functions. Consolidate code paths, etc. The file is nearly half the size it used to be! Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove dead code in s_stencil.cBrian Paul2011-12-241-33/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: rewrite _swrast_read_stencil_span()Brian Paul2011-12-241-5/+26
| | | | | | | | | Use format pack/unpack functions instead of deprecated renderbuffer GetRow/PutRow functions. v2: use get_stencil_address(), s/destVals/newVals/ Reviewed-by: Eric Anholt <[email protected]>