summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-19r600g/sb: initial code commit for the optimizing shader backendr600-sbVadim Girlin65-120/+18564
2013-04-19r600g: always create reverse lookup isa tablesVadim Girlin1-10/+2
2013-04-19gallium: handle drirc disable_glsl_line_continuations optionVadim Girlin4-1/+8
NOTE: This is a candidate for the 9.1 branch Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-18llvmpipe: Take in consideration all current constant buffers when mapping.José Fonseca1-3/+9
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
2013-04-18nv50: add remaining RGBX formatsChristoph Bumiller1-4/+12
Not all are supported as render targets. The state tracker fallback of using RGBA instead of RGBX currently fails for blending, we could work around this by clearing their alpha to 1 and modifying the color mask to disable writing alpha.
2013-04-18st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller20-7/+115
This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
2013-04-18nv50: set BORDER_COLOR_SRGB in sampler objectsChristoph Bumiller2-19/+35
2013-04-18nv50: fix 4th component of Lx_SINT/UINT formatsChristoph Bumiller1-6/+6
2013-04-18r600g: Fix build with --enable-openclTom Stellard1-1/+2
2013-04-18mesa: enable GL_ARB_texture_float if TEXTURE_FLOAT_ENABLED is definedBrian Paul1-1/+3
Per message on mesa-users list, this wasn't working before. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-18gallivm: change cubemaps / derivatives handling, take 55Roland Scheidegger3-104/+119
Turns out the previous "fix" for handling per-pixel face selection and derivatives didn't work out that well - the derivatives were wrong by quite a bit, in theory transformation of the derivatives into cube space should work, but would be _a lot_ more work than the "simplified" transform used. So, for explicit derivatives, I'm just giving up and go back to not honoring them. For implicit derivatives (and the fake explicit ones) however we try something a little different, we just calculate rho as we would for a 3d texture, that is after scaling the coords by the inverse major axis. This gives the same results as calculating the derivs after projection of the coords to the same face as long as all pixels hit the same face (and only without rho_no_opt, otherwise it should be a bit worse). And when not all pixels are hitting the same face, the results aren't so hot but not catastrophically bad (I believe not off by more than a factor of 2 without no_rho_approx and not more than sqrt(2) with no_rho_approx). I think this is better than just picking the wrong face but who knows... Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-18gallivm: Add no_rho_approx debug optionRoland Scheidegger3-118/+185
This will calculate rho correctly as sqrt(max((ds/dx)^2 + (dt/dx)^2 + (dr/dx)^2), (ds/dx)^2 + (dt/dx)^2 + (dr/dx)^2)) instead of max(|ds/dx|,|dt/dx|,|dr/dx|,|ds/dy|,|dt/dy,|dr/dy|) (for 3 coords - 2 coords work analogous, for 1 coord there's no point doing the exact version), for both implicit and explicit derivatives. While such approximation seems to be allowed in OpenGL some APIs may be less forgiving, and the error can be quite large (sqrt(2) for 2 coords, sqrt(3) for 3 coords so wrong by nearly one mip level in the latter case). This also helps to single out "real" bugs from "expected" ones, so it is debug only (though at least combined with no_brilinear I didn't really see much of a performance difference but only tested with a debug build - at least with implicit mipmaps the instruction count is almost exactly the same though the instructions are more complex (1 sqrt and mul/adds instead of and/max mostly). The code when the option isn't set stays exactly the same. v2: rename no_rho_opt to no_rho_approx. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-18llvmpipe: Support half integer pixel center fs coord.José Fonseca4-3/+28
Tested with graw/fs-fragcoord 2/3, and piglit glsl-arb-fragment-coord-conventions. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-18llvmpipe: Remove the static interpolation.José Fonseca3-384/+19
No longer used. If we ever want the old behavior we can run a loop unroller pass. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-18gallivm: Drop pos arg from lp_build_tgsi_soa.José Fonseca4-8/+2
Never used. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-18docs: update release notes for 9.2Andreas Boll1-3/+8
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-04-18ralloc: Move declarations before statements.José Fonseca1-2/+4
Trivial. Should fix MSVC build.
2013-04-17configure: enable vdpau and xvmc detection, with galliumEmil Velikov1-2/+8
Currently the vdpau and xvmc detection code, is enabled for all builds. The state trackers exist only within gallium. Enable whenever at least one gallium driver is selected v2: removed stray '-a' [mattst88 v3]: Removed stray $. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63645 Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-04-17i965: Check reg.nr for BRW_ARF_NULL instead of reg.file.Matt Turner1-1/+1
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-17i965: Implement work-around for CMP with null dest on Haswell.Matt Turner1-0/+12
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-17i915g: Release old fragment shader sampler views with current pipeStuart Abercrombie1-3/+8
We were trying to use a destroy method from a deleted context. This fix is based on what's in the svga driver. Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2013-04-17i965/vec4: Fix hypothetical use of uninitialized data in attribute_map[].Paul Berry1-0/+11
Fixes issue identified by Klocwork analysis: 'attribute_map' array elements might be used uninitialized in this function (vec4_visitor::lower_attributes_to_hw_regs). The attribute_map array contains the mapping from shader input attributes to the hardware registers they are stored in. vec4_vs_visitor::setup_attributes() only populates elements of this array which, according to core Mesa, are actually used by the shader. Therefore, when vec4_visitor::lower_attributes_to_hw_regs() accesses the array to lower a register access in the shader, it should in principle only access elements of attribute_map that contain valid data. However, if a bug ever caused the driver back-end to access an input that was not flagged as used by core Mesa, then lower_attributes_to_hw_regs() would access uninitialized memory, which could cause illegal instructions to get generated, resulting in a possible GPU hang. This patch makes the situation more robust by using memset() to pre-initialize the attribute_map array to zero, so that if such a bug ever occurred, lower_attributes_to_hw_regs() would generate a (mostly) harmless access to r0. In addition, it adds assertions to lower_attributes_to_hw_regs() so that if we do have such a bug, we're likely to discover it quickly. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-18ralloc: don't write to memory in case of alloc fail.Dave Airlie1-0/+2
For some reason I made this happen under indirect rendering, I think we might have a leak, valgrind gave out, so I said I'd fix the basic problem. NOTE: This is a candidate for stable branches. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-17mesa: generate glGetInteger/Boolean/Float/Doublev() code for all APIsBrian Paul4-35/+7
No longer pass -a flag to the get_hash_generate.py script to specify OpenGL, ES1, ES2, etc. This updates the autoconf, scons and android build files too (so we can bisect). This is the last of the API-dependent conditional compilation in core Mesa. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17mesa: remove mfeatures.hBrian Paul1-53/+0
No longer needed. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul123-127/+0
None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17glapi: no longer emit #include "mfeatures.h" in generated filesBrian Paul3-8/+0
None of the symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17mesa: remove FEATURE_remap_table from remap.[ch]Brian Paul2-40/+0
It was always defined. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17glapi: remove FEATURE_remap_table test (it's always defined)Brian Paul1-15/+0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-17draw/so: respect leading/provoking vertex infoZack Rusin1-1/+1
we were ignoring leading/provoking vertex settings which was breaking decomposition of some strips. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-17softpipe/so: use the correct variable for reporting stream outZack Rusin1-5/+15
we were using the wrong vars, reporting incorrect stream output statistics. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-17gallivm/gs: fix indirect addressing in geometry shadersZack Rusin3-6/+30
We were always treating the vertex index as a scalar but when the shader is using indirect addressing it will be a vector of indices for each channel. This was causing some nasty crashes insides LLVM. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-17st/wgl: fix issue with SwapBuffers of minimized windowsBrian Paul2-9/+15
If a window's minimized we get a zero-size window. Skip the SwapBuffers in that case to avoid some warning messages with the VMware svga driver. Internal bug #996695 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-17intel: Don't dereference a NULL pointer of calloc failsIan Romanick1-0/+4
The caller of NewTextureObject does the right thing if NULL is returned, so this function should do the right thing too. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-17i965: Trim trailing whitespace in brw_defines.h.Eric Anholt1-144/+144
It was all over the formats section I wanted to edit. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-17r200: fix build failure introduced with cbbcb0247e6aa8d7adc274a94206ee02f9c70beaLaurent Carlier1-1/+1
Signed-off-by: Brian Paul <brianp@vmware.com>
2013-04-17st/mesa: clean up formatting in st_cb_msaa.cBrian Paul1-12/+18
Insert blank lines, wrap lines, remove trailing whitespace, etc.
2013-04-17mesa: remove gl_context::_TriangleCapsBrian Paul2-8/+4
No longer used anywhere. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_TRI_LIGHT_TWOSIDE flagBrian Paul10-71/+22
v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_TRI_UNFILLED flagBrian Paul10-32/+41
Use alternate code in intel, r200, radeon drivers. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_TRI_SMOOTH flagBrian Paul4-7/+2
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_TRI_STIPPLE flagBrian Paul5-6/+3
Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_TRI_OFFSET flagBrian Paul4-26/+5
Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_POINT_ATTEN flagBrian Paul5-18/+5
For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_POINT_SMOOTH flagBrian Paul6-8/+3
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_LINE_STIPPLE flagBrian Paul5-13/+4
For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove DD_SEPARATE_SPECULAR flagBrian Paul6-21/+7
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-17mesa: remove unused DD_LINE_SMOOTH flagBrian Paul4-6/+1
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-16draw/gs: make sure geometry shaders don't overflowZack Rusin5-11/+81
The specification says that the geometry shader should exit if the number of emitted vertices is bigger or equal to max_output_vertices and we can't do that because we're running in the SoA mode, which means that our storing routines will keep getting called on channels that have overflown (even though they will be masked out, but we just can't skip them). So we need some scratch area where we can keep writing the overflown vertices without overwriting anything important or crashing. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-04-16draw/gs: Return early if the passed geometry shader is nullZack Rusin1-0/+3
Can happen if we were using stream output without geometry shader, by returning early we avoid a crash. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>