summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gles2: a stub implementation for GL_EXT_discard_framebufferTapani Pälli2013-02-207-1/+77
| | | | | | | | | | | This patch implements a stub for GL_EXT_discard_framebuffer with required checks listed by the extension specification. This extension is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0 as the rendering backend. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-and-tested-by: Chad Versace <[email protected]>
* r600g/Cayman: Fix blending using destination alpha factor but non-alpha destMichel Dänzer2013-02-201-4/+9
| | | | | | | | Only compile tested, but should fix at least some piglit fbo-blending tests. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Fix blending using destination alpha factor but non-alpha destinationMichel Dänzer2013-02-201-3/+5
| | | | | | | | 11 more little piglits. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: implement 3D transfersMarek Olšák2013-02-201-20/+29
| | | | | | | | | | | | | That means we can map and read multiple slices with one transfer_map call. [ Cherry-picked from r600g commit 1aebb6911e9aa1bd8900868b58d1750ca83a20c7 ] 11 more little piglits on master, 1 more on the 9.1 branch (Marek's glTex(Sub)Image improvements on master broke the other 10). NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: add assertions to prevent creation of invalid surfacesMarek Olšák2013-02-203-15/+18
| | | | | | | | [ Cherry-picked from r600g commit ef11ed61a0414d0405c3faf7f48fa3f1d083f82e ] NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: use u_box_origin_2d helper functionMarek Olšák2013-02-201-5/+2
| | | | | | | | [ Cherry-picked from r600g commit b278aba42310e8fa30f2408b9dcd58dbb4901724 ] NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* DRI2: Don't disable GLX_INTEL_swap_event unconditionallyZack Rusin2013-02-191-3/+12
| | | | | | | | | | | | | | | | | | | | GLX_INTEL_swap_event is broken on the server side, where it's currently unconditionally enabled. This completely breaks systems running on drivers which don't support that extension. There's no way to test for its presence on this side, so instead of disabling it uncondtionally, just disable it for drivers which are known to not support it. It makes sense because most drivers do support it right now. We'll be able to remove this once Xserver properly advertises GLX_INTEL_swap_event. Note: This is a candidate for stable branch branches. Signed-off-by: Zack Rusin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60052 Reviewed-by: Jesse Barnes <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Ian Romanick <[email protected]>
* i965/fs: Enable CSE on uniform pull constant loads.Eric Anholt2013-02-191-0/+3
| | | | | | | | Improves on a major performance regression for the dolphin wii emulator from its move to using UBOs. Performance in the UBO codepath (as replayed through apitrace) is up 21.1% +/- 2.3% (n=26/29). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Only do CSE when the dst types match.Eric Anholt2013-02-191-1/+2
| | | | | | | | | | We could potentially do some CSE even when the dst types aren't the same on gen6 where there is no implicit dst type conversion iirc, or in the case of uniform pull constant loads where the dst type doesn't impact what's stored. But it's not worth worrying about. Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* i965/fs: Delay setup of uniform loads until after pre-regalloc scheduling.Eric Anholt2013-02-193-27/+66
| | | | | | | | This should fix the register allocation explosion on the GLES 3.0 test on gen6. It also gives us an instruction that will fit our CSE handling. Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* i965/fs: Fix copy propagation with smearing.Eric Anholt2013-02-191-1/+2
| | | | | | | | | | We were correctly relaying the smear from MOV's src, but if the MOV didn't do a smear, we don't want to smash the smear value from the instruction being propagated into. Prevents a regression in the upcoming UBO change. Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* i965/fs: Add a bit more instruction dumping useful for upcoming work.Eric Anholt2013-02-191-1/+30
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* radeon/llvm: Fix build with LLVM 3.3Tom Stellard2013-02-192-1/+12
|
* r600g: Add $(DEFINES) to AM_CXXFLAGSTom Stellard2013-02-191-1/+2
| | | | This way llvm_wrapper.cpp is compiled with -DHAVE_LLVM=0x....
* i965: Remove unused userclip flags.Paul Berry2013-02-193-5/+0
| | | | | | | | | | brw_vs_prog_data::userclip hasn't been used since commit f0cecd4 (i965: Move VUE map computation to once at VS compile time). brw_gs_prog_key::userclip_active hasn't been used since commit 9f3d321 (i965: Make the userclip flag for the VUE map come from VS prog data). Reviewed-by: Kenneth Graunke <[email protected]>
* llvmpipe: fix handling of 0 x 0 framebuffer sizeBrian Paul2013-02-191-2/+2
| | | | | | | Bump up the size to 1 x 1. This fixes a number of potential failure points in the code. See also http://bugs.freedesktop.org/show_bug.cgi?id=61012
* st/xlib: initialize the drawable size in create_xmesa_buffer()Brian Paul2013-02-191-2/+1
| | | | | | | | | Otherwise, the PBuffer's size was never set. This also initializes the buffer size for windows, pixmaps, etc. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61012 Note: This is a candidate for the stable branches.
* glx: fix glGetTexLevelParameteriv for indirect renderingStefan Brüns2013-02-191-1/+3
| | | | | | | | | | | | | | | | A single element in a GLX reply is contained in the header itself. The number of elements is denoted in the "n" field of the reply. If "n" is 1, the length of additional data is 0. The XXX_data_length() function of xcb does not return the length of the (optional, n>1) data but the number of elements. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=59876 Note: This is a candidate for the stable branches. Signed-off-by: Stefan Brüns <[email protected]> Signed-off-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: implement glBitmap unpacking from a PBO, for the cache pathBrian Paul2013-02-191-2/+11
| | | | | | | | | We weren't mapping the PBO when using the bitmap cache (but we had the PBO code for the non-cache path.) Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61026 Note: This is a candidate for the stable branches.
* draw: fix non-perspective interpolation in interp()Brian Paul2013-02-191-3/+8
| | | | | | | | | | | This fixes a regression from ab74fee5e1a3fc3323b7238278637b232c2d0d95. When we use the clip coordinate to compute the screen-space interpolation factor, we need to first apply the divide-by-W step to the clip coordinate. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=60938 Note: This is a candidate for the 9.1 branch.
* st/mesa: remove what is left from u_blitMarek Olšák2013-02-186-29/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: simplify and improve CopyTexSubImageMarek Olšák2013-02-183-260/+99
| | | | | | | | | | | | | | | | | | | | It has become a bit messy. Changes: - finally correct checking for transfer ops depending on the base format - making sure the base internal format and the texture format match (we were ignoring it, but it's important for correctness) - the way-too-strict rule that both src and dst base formats must be the same was dropped; ensuring the simpler and more permissive rule mentioned above is enough - stop using util_blit_pixels; pipe->blit is flexible enough, and now that we have RGBX and red-alpha formats, pipe->blit can be used for more cases Reviewed-by: Brian Paul <[email protected]>
* st/mesa: don't do sRGB conversion in CopyTexSubImageMarek Olšák2013-02-181-2/+2
| | | | | | | | Assuming I understand EXT_texture_sRGB correctly. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement blit-based TexImage and TexSubImageMarek Olšák2013-02-183-4/+239
| | | | | | | | | | | | | | | | | | | A temporary texture is created such that it matches the format and type combination and pixels are copied to it using memcpy. Then the blit is used to copy the temporary texture to the texture image being modified by TexImage or TexSubImage. The blit takes care of the format and type conversion and swizzling. The result is a very fast texture upload involving as little CPU as possible. This improves performance in apps which upload textures during rendering. An example is the Wine OpenGL backend for DirectDraw, which I used to test the game StarCraft. Profiling had shown that TexSubImage was taking 50% of CPU time without this patch, which was the main motivation for this work, and now TexSubImage only takes 14% of CPU time. I had to underclock my CPU to see any difference in the game and this patch does make the game a lot faster if the CPU is slow (or using the powersave cpufreq profile). Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix blit-based GetTexImage for 1D array texturesMarek Olšák2013-02-181-19/+52
| | | | | | | | | | | | | This is not easy to hit, because we have 3 code paths now (tried in this order): - memcpy-based (skips the blit) -> _mesa_tex_getimage - blit-based - slow pixel packing -> _mesa_tex_getimage The main difference later in the code is the parameters of _mesa_image_address3d. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix blit-based GetTexImage for depth/stencil formatsMarek Olšák2013-02-181-1/+1
| | | | | | BTW, we have 0 tests for glGetTexImage(format=GL_DEPTH*). Reviewed-by: Brian Paul <[email protected]>
* st/mesa: factor out code for determining blit.mask from CopyTexSubImageMarek Olšák2013-02-181-42/+66
| | | | | | I'll need this later. Reviewed-by: Brian Paul <[email protected]>
* radeonsi: Fix PIPE_FORMAT_X32_S8X24_UINT sampler hardware formatMichel Dänzer2013-02-181-1/+1
| | | | | | 4 more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Use stencil surface level information for stencil texturingMichel Dänzer2013-02-182-7/+10
| | | | | | 7 more little dwarves^W piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: properly implement S8Z24 depth-stencil formatMichel Dänzer2013-02-181-29/+66
| | | | | | | | Based on r600g commit 2b9659c9e627ad03160899b8be04f96307d098eb . Fixes crashes with 4 piglit tests which are now hitting these formats. NOTE: This is a candidate for the 9.1 branch.
* r600g/llvm: Support for TBOVincent Lejeune2013-02-181-0/+28
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Set Inputs/Outputs count to 32 (api reported value)Vincent Lejeune2013-02-181-2/+2
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Fix alpha_to_one piglit testsVincent Lejeune2013-02-183-0/+4
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Add support for UBOVincent Lejeune2013-02-182-1/+22
| | | | | | NOTE: This is a candidate for the Mesa stable branch. Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* i965: Fix leak in blorp CopyTexSubImage2DChristopher James Halse Rogers2013-02-161-2/+2
| | | | | | | | | | | | | | | _mesa_delete_renderbuffer does not call the driver-specific renderbuffer delete function, so the blorp code was leaking the Intel-specific bits, including some GEM objects. Call the renderbuffer's ->Delete() method instead, which does the right thing. Fixes Unity rapidly sending the machine into the arms of the OOM-killer Note: This is a candidate for the 9.1 branch. Reviewed-by: Eric Anholt <[email protected]>
* gallivm/tgsi: fix issues with sample opcodesRoland Scheidegger2013-02-167-95/+247
| | | | | | | | We need to encode them as Texture instructions since the NumOffsets field is encoded there. However, we don't encode the actual target in there, this is derived from the sampler view src later. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm/tgsi: fix src modifier fetching with non-float types.Roland Scheidegger2013-02-164-5/+54
| | | | | | | | | | | | | | Need to take the type into account. Also, if we want to allow mov's with modifiers we need to pick a type (assume float). v2: don't allow all modifiers on all type, in particular don't allow absolute on non-float types and don't allow negate on unsigned. Also treat UADD as signed (despite the name) since it is used for handling both signed and unsigned integer arguments and otherwise modifiers don't work. Also add tgsi docs clarifying this. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix issues with trunc/round/floor/ceil with no arch roundingRoland Scheidegger2013-02-162-66/+199
| | | | | | | | | | | | | | | | | | | | The emulation of these if there's no rounding instruction available is a bit more complicated than what the code did. In particular, doing fp-to-int/int-to-fp will not work if the exponent is large enough (and with NaNs, Infs). Hence such values need to be filtered out and the original value returned in this case (which fortunately should always be exact). This comes at the expense of performance (if your cpu doesn't support rounding instructions). Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for values near negative (for floor) or positive (for ceil) zero, fix that as well (fixing this issue might not actually be slower except for ceil/iceil if the type is not signed which is probably rare - note iceil has no callers left in any case). Also add some new rounding test values in lp_test_arit to actually test for that stuff (which previously would have failed without sse41). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701.
* gallivm: DIV shouldn't be deprecated.Roland Scheidegger2013-02-161-1/+0
| | | | | | (Though it looks glsl won't emit it.) Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Use PROGRAM_ERROR_STRING_ARB instead of the _NV nameMatt Turner2013-02-151-1/+1
| | | | | | | Since NV_fragment_program is now gone. No functional change, since the values are identical. Reviewed-by: Kenneth Graunke <[email protected]>
* trace: add context pointer sanity checkingBrian Paul2013-02-153-0/+23
| | | | | | | To help catch mixed up context pointer bugs in the future, add a trace_context_check() function and some new assertions. Reviewed-by: Jose Fonseca <[email protected]>
* trace: fix incorrect trace_surface::base.context pointerBrian Paul2013-02-153-4/+7
| | | | | | | | | When a trace_surface object is created in trace_surf_create() we weren't correctly setting the surface's context pointer. Instead of it being the trace context, it was the wrapped driver's context. This caused things to blow up sometimes during surface deallocation. Reviewed-by: Jose Fonseca <[email protected]>
* trace: whitespace, comment clean-upsBrian Paul2013-02-151-6/+2
|
* trace: move struct tr_list to tr_texture.hBrian Paul2013-02-152-5/+8
| | | | That's the only place it's used.
* st/mesa: fix format query for GL_ARB_texture_rgBrian Paul2013-02-151-3/+4
| | | | | | | | | | | The GL_ARB_texture_rg spec says that we need to support both texturing and rendering for the GL_RED and GL_RG formats. So move the format check up into the rendertarget_mapping[] list. Also, add PIPE_FORMAT_R8_UNORM to the list of formats required. Note: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]>
* i965/fs: Do a general SEND dependency workaround for the original 965.Eric Anholt2013-02-153-42/+229
| | | | | | | | | | | | | We'd been ad-hoc inserting instructions in some SEND messages with no knowledge of when it was required (so extra instructions), but not all SENDs (so not often enough). This should do much better than that, though it's still flow-control-ignorant. v2: Use BRW_MAX_MRF instead of magic numbers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58960 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: Candidate for the stable branches.
* egl-wayland: Fix left-over wl_display_roundtrip() usageKristian Høgsberg2013-02-141-1/+1
| | | | | We have to use the EGL wayland event queue for roundtrip, so use the wayland_roundtrip() helper, which does just that.
* i965/gen7: Set up all samplers even if samplers are sparsely used.Eric Anholt2013-02-141-1/+1
| | | | | | | | | | | | | | | | | In GLSL, sampler indices are allocated contiguously from 0. But in the case of ARB_fragment_program (and possibly fixed function), an app that uses texture 0 and 2 will use sampler indices 0 and 2, so we were only allocating space for samplers 0 and 1 and setting up sampler 0. We would read garbage for sampler 2, resulting in flickering textures and an angry simulator. Fixes bad rendering in 0 A.D. and ETQW. This was fixed for pre-gen7 by 28f4be9eb91b12a2c6b1db6660cca71a98c486ec Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25201 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58680 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable branches.
* r600g: add support for red-alpha render targetsMarek Olšák2013-02-142-0/+44
|
* r300g: add support for red-alpha render targetsMarek Olšák2013-02-143-0/+20
|