summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: Make use of the new PIPE_TRANSFER_DISCARD_* for buffer object.Mathias Fröhlich2011-03-151-5/+9
| | | | | | | | In memory mapping buffer objects make use of PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE and PIPE_TRANSFER_DISCARD_RANGE when appropriate. Signed-off-by: Mathias Fröhlich <[email protected]>
* i965: Enable texture lookups whose return type is 'float'Kenneth Graunke2011-03-141-1/+4
| | | | | | | This enables the new shadow texture functions in GLSL 1.30. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Fix tex_swizzle when depth mode is GL_REDChad Versace2011-03-141-1/+2
| | | | | | | Change swizzle from (x000) to (x001). Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove dead assignmentChad Versace2011-03-141-2/+0
| | | | | | | | The assignment on line 368, `tex_swizzles[i] = SWIZZLE_NOOP`, is rendered dead by the reassignment on line 392. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: rename _mesa_texstore_a8 -> _mesa_texstore_unorm8Marek Olšák2011-03-141-6/+6
| | | | It's a generic function capable of storing A8, L8, I8, R8.
* mesa: fix up assertion in _mesa_source_buffer_existsMarek Olšák2011-03-141-0/+2
| | | | | | | | | | This was probably missed when implementing luminance and luminance alpha render targets. _mesa_get_format_bits checks for both GL_*_BITS and GL_TEXTURE_*_SIZE. This fixes: main/framebuffer.c:892: _mesa_source_buffer_exists: Assertion `....' failed.
* ir_to_mesa: do not check the number of uniforms against hw limitsMarek Olšák2011-03-141-5/+3
| | | | | | | | | | | | | | | | | | | | | The r300 compiler can eliminate unused uniforms and remap uniform locations if their number surpasses hardware limits, so the limit is actually NumParameters + NumUnusedParameters. This is important for some apps under Wine to run. Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific constants on top of that, so in total there is more uniforms than r300 can handle. This was the main motivation for implementing the elimination of unused constants. We should allow drivers to implement fail & recovery paths where it makes sense, so giving up too early especially when comes to uniforms is not so good idea, though I agree there should be some hard limit for all drivers. This patch fixes: - glsl-fs-uniform-array-5 - glsl-vs-large-uniform-array on drivers which can eliminate unused uniforms.
* Revert "mesa: Convert fixed function fragment program generator to GLSL IR."Eric Anholt2011-03-124-668/+783
| | | | | This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5. There were regressions (Bug #35244) and more review has been requested.
* Revert "mesa: Track a computed _CurrentFragmentProgram for current ↵Eric Anholt2011-03-122-10/+4
| | | | | | gl_shader_program" This reverts commit b4452c3baad6e0379eeb7f22f2e51d13999e1323.
* Revert "i965: Use the fixed function GLSL program instead of the ARB program."Eric Anholt2011-03-122-5/+5
| | | | | This reverts commit 81b34a4e3a7aec9cdf2781757408dc5e9eec79cb. There were regressions in the core change that this depends on.
* gallium: Delay the creation of simple helper shadersJakob Bornecrantz2011-03-121-16/+38
|
* u_blitter: Do blits in linear color space.Henri Verbeet2011-03-121-1/+1
| | | | | Blits between sRGB and linear formats should happen in linear color space. This fixes piglit fbo/fbo-srgb-blit.
* r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500Marek Olšák2011-03-121-1/+1
| | | | | | | | | | The docs say it can be set for direct texture lookups, but even that causes problems. This fixes the wireframe bug: https://bugs.freedesktop.org/show_bug.cgi?id=32688 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: TEX instructions don't support negation on source argumentsMarek Olšák2011-03-121-3/+0
| | | | | | | This fixes piglit: - glsl-fs-texture2d-dependent-4 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)Marek Olšák2011-03-122-9/+0
| | | | NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: fix translating the src negate bits in pair_translateMarek Olšák2011-03-121-3/+8
| | | | | | | | | | | (1, -_, ...) was converted to (-1, ...) because of the negation in the second component. Masking out the unused bits fixes this. Piglit: - glsl-fs-texture2d-branching NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300g: implement fragment color clamping in the shaderMarek Olšák2011-03-122-0/+23
| | | | | This finishes the implementation of the fragment color clamp control for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
* r300/compiler: fix the saturate modifier when applied to TEX instructionsMarek Olšák2011-03-121-1/+5
| | | | This bug can only be triggered if the source texture is either signed or float.
* nouveau: Build fixAdam Jackson2011-03-111-0/+1
| | | | nouveau_vieux_dri.so.tmp: undefined reference to `_mesa_need_secondary_color'
* r600: Build fixAdam Jackson2011-03-112-0/+2
| | | | r600_dri.so.tmp: undefined reference to `_mesa_rgba_logicop_enabled'
* scons: Move texenvprogram.c to ff_fragment_shader.cpp.Vinson Lee2011-03-111-1/+1
|
* i965: Use the fixed function GLSL program instead of the ARB program.Eric Anholt2011-03-112-5/+5
| | | | | | This gets one more piece of the pipeline onto the new codegen backend. Once ARB_fragment_program can generate GLSL programs, we can nuke the old backend.
* mesa: Track a computed _CurrentFragmentProgram for current gl_shader_programEric Anholt2011-03-112-4/+10
| | | | | | | This is like how we track FragmentProgram._Current for the computed ARB fragment program for fixed function texenv, but this gives direct access to the gl_shader_program for drivers to codegen from, skipping ARB_fp.
* mesa: Convert fixed function fragment program generator to GLSL IR.Eric Anholt2011-03-114-783/+668
| | | | | | | | This is a step towards providing a direct route for drivers accepting GLSL IR for codegen. Perhaps more importantly, it runs the fixed function fragment program through the GLSL IR optimization. Having seen how easy it is to make ugly fixed function texenv code that can do unnecessary work, this may improve real applicatinos.
* mesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.Eric Anholt2011-03-111-0/+5
| | | | | | | It would be nice if we handled optimized uniform math like this in some generic way, since people often end up doing uniform expressions in shaders, but for now keep this hard-coded like it was in the texenvprogram code.
* mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.Eric Anholt2011-03-111-0/+11
| | | | | | | For fixed function fragment processing in GLSL IR, we want to be able to reference this state value. gl_* not explicitly permitted is reserved, so using this variable name internally shouldn't be any issue.
* mesa: Move texenvprogram.c to ff_fragment_shader.cpp.Eric Anholt2011-03-112-7/+16
| | | | | This file is about to change to generating a shader program instead of a fragment program.
* prog_cache: Add some support for shader_programs in prog_cache.Eric Anholt2011-03-112-4/+58
| | | | | | This is used in the upcoming fixed function shader_program generation, and shader_program and ARB programs are together in this code until both fragment and vertex ff get converted.
* mesa: Don't try to remove an internal shader_program from the hash.Eric Anholt2011-03-111-2/+4
| | | | It fails on assertions if the key isn't actually present.
* i965: Use ffs() on a 32-bit int value instad of ffsll().Eric Anholt2011-03-111-1/+1
|
* gallium: remove flags from the flush functionMarek Olšák2011-03-114-8/+8
| | | | | | | | | | The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
* gallium: remove the geom_flags param from is_format_supportedMarek Olšák2011-03-118-160/+119
|
* gallium: cleanup fence_signalled and fence_finishMarek Olšák2011-03-112-3/+3
| | | | So that they don't have the driver-specific param and return type.
* mesa: test against MaxUniformComponents in check_resources()Brian Paul2011-03-111-3/+3
| | | | | | Since we're compiling/linking GLSL shaders we should check against the shader uniform limits, not the legacy vertex/fragment program parameter limits which are usually lower.
* mesa: move location of some geometry program limitsBrian Paul2011-03-115-26/+29
| | | | | | | The gl_program_constants struct is for limits that are applicable to any/all shader stages. Move the geometry shader-only fields into the gl_constants struct. Remove redundant MaxGeometryUniformComponents field too.
* mesa: use check_resources() to check program against limitsBrian Paul2011-03-111-0/+58
| | | | | | Without these checks we could create shaders with more samplers, constants than the driver could handle. Fail linking rather than dying later.
* mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlinesBrian Paul2011-03-1121-59/+85
| | | | and rename them.
* mesa: call FLUSH_VERTICES() before deleting shaders, buffers, query objectsBrian Paul2011-03-113-0/+5
| | | | | | | | Need to flush rendering (or at least indicate that the rug might be getting pulled out from underneath us) when a shader, buffer object or query object is about to be deleted. Also, this helps to tell the VBO module to unmap its current vertex buffer.
* st/mesa: remove unnecessary flushesMarek Olšák2011-03-111-3/+0
| | | | | | | The framebuffer cache flush should be implicit when calling set_framebuffer_state. There is no need to flush the command stream either.
* intel: Don't complain when getparam fails due to a missing param.Eric Anholt2011-03-091-1/+3
| | | | | This is an expected behavior when we're testing for the presence of new kernel features.
* i965: Pack the tracked state atoms into separate arrays for prepare/emit.Chris Wilson2011-03-092-42/+43
| | | | | | Improves performance of a hacked-up scissor-many (to reuse a small set of scissors instead of blowing out the cache, and then to run 100x more iterations so it actually took some time) by 3.6% +/- 1.2% (n=10)
* gallium: add timeout parameter to fence_finishMarek Olšák2011-03-082-3/+4
| | | | | This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.
* st/mesa: implement ARB_syncMarek Olšák2011-03-086-0/+168
| | | | | | The ServerWaitSync implementation matches Intel's driver. The extension is advertised when pipe_screen::fence_finish is set.
* st/mesa: cleanup checking for signed compressed formats in generate_mipmapsMarek Olšák2011-03-081-8/+4
|
* st/mesa: add LATC and 3DC supportMarek Olšák2011-03-083-3/+76
| | | | softpipe passes all tests.
* mesa: add ATI_texture_compression_3dcMarek Olšák2011-03-087-0/+30
| | | | | | | LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy. Note that there is no specification for 3DC, just a few white papers from ATI.
* mesa: add EXT_texture_compression_latcMarek Olšák2011-03-0813-7/+234
| | | | | | | | | | | | | | | | | The encoding/decoding algorithms are shared with RGTC. Thanks to some magic with the base format, the RGTC texstore functions work for LATC too. swrast passes the related piglit tests besides two things: - The alpha channel is wrong (it's always 1), however the incorrect alpha channel makes some other tests fail too, so I guess it's unrelated to LATC. - Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]), however RGTC has the same problem. Further testing (with other of my patches) shows that hardware drivers and softpipe work. BTW, ETQW uses this extension.
* st/mesa: Fix an incorrect user vertex buffer referenceThomas Hellstrom2011-03-081-4/+2
| | | | | | | | st->user_vb[attr] was always pointing to the same user vb, regardless of the value of attr. Together with reverting the temporary workaround for bug 34378, and a fix in the svga driver, this fixes googleearth on svga. Signed-off-by: Thomas Hellstrom <[email protected]>
* vbo: mark vertex arrays as dirty when re-bindingMarek Olšák2011-03-081-1/+12
| | | | | This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34378
* r300/compiler: remove unused variablesMarek Olšák2011-03-081-1/+1
|