summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add _NEW_CURRENT_ATTRIB in _mesa_program_state_flags()Brian Paul2011-09-301-2/+5
| | | | | | | | | | | | If color material mode is enabled, constant buffer entries related to the material coefficients will depend on glColor. So add _NEW_CURRENT_ATTRIB to the bitset returned for material-related constants in _mesa_program_state_flags(). This fixes a bug exercised by the new piglit draw-arrays-colormaterial test. Note: This is a candidate for the 7.11 branch.
* st/mesa: implement AllocTextureImageBuffer() driver hookBrian Paul2011-09-301-0/+86
| | | | | | | | This hasn't been needed so far since none of the core Mesa code paths that call ctx->Driver.AllocTextureImageBuffer() are used with the state tracker. That will change in upcoming patches. Note that this function duplicates some code seen in the st_TexImage() function. That can be cleaned up later.
* mesa: simplify parameters to GetTexImage() driver hookBrian Paul2011-09-308-37/+26
| | | | | | | The target, level and texObj can be obtained through the texImage parameter. We could make similar changes for the TexImage() hooks too. Reviewed-by: Eric Anholt <[email protected]>
* xorg/vmwgfx: Kill this target. It's not used anymore.Thomas Hellstrom2011-09-3014-2784/+1
| | | | | | | | | | | This fixes a build error introduced with commit "winsys/svga: Update to vmwgfx kernel module 2.1" if both the svga driver and the xorg state tracker was enabled at the same time. If needed we can re-add a minimal target for basic functionality. Signed-off-by: Thomas Hellstrom <[email protected]>
* intel: include version.h to get _mesa_override_glsl_version() prototypeBrian Paul2011-09-291-0/+1
|
* gallium: Set renderbuffer's InternalFormat when rendering to textureSimon Farnsworth2011-09-291-0/+1
| | | | | | | | | | | | | | When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to take a slow path unnecessarily. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41263 Signed-off-by: Simon Farnsworth <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* winsys/svga: Update to vmwgfx kernel module 2.1Thomas Hellstrom2011-09-2911-263/+668
| | | | | | | | | Introduces fence objecs and a size limit on query buffers. The possibility to map the fifo from user-space is gone, and replaced by an ioctl that reads the 3D capabilities. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecranz <[email protected]>
* st/xa: Don't call fence_reference with an unitialized fence handle as dstThomas Hellstrom2011-09-291-1/+1
| | | | Signed-off-by: Thomas Hellstrom <[email protected]>
* st/xa: surfaces and sampler views are per contextThomas Hellstrom2011-09-295-63/+65
| | | | | | | | Don't store references to these on the surface but on the context. References to transfers are still stored on the surface since we allow only a single map of a surface at a time. Signed-off-by: Thomas Hellstrom <[email protected]>
* mesa: Remove ARB_texture_mirrored_repeat extension enable flagIan Romanick2011-09-2914-24/+5
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, and savage (Savage3D and other pre-Savage4). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_blend_subtract extension enable flagIan Romanick2011-09-2913-19/+4
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on i810, mach64, mga, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_stencil_wrap extension enable flagIan Romanick2011-09-2913-23/+5
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-2914-45/+9
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, or r128. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_combine extension enable flagIan Romanick2011-09-2911-145/+54
| | | | | | | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. It looks like the only hardware supported by Mesa that cannot do ARB_texture_env_combine is pre-NV10 NVIDA chips. It appears that these chips cannot do the GL_SUBTRACT mode. Based on looking at older copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported ARB_texture_env_combine on those chips either. This extension was previously not supported on mach64, mga (G200), r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_add extension enable flagIan Romanick2011-09-2911-18/+4
| | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on mach64, mga (G200), savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove ARB_multitexture extension enable flagIan Romanick2011-09-2913-29/+7
| | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_CLIENT_ACTIVE_TEXTURE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on i810, mga (G200), or tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* llvmpipe: Convert some of the null checks back to asserts.José Fonseca2011-09-291-26/+12
| | | | | | This turns some of the null check warnings in commit 023ca40d80670ac0eee8c755ca5f54b1e7c2712e back to asserts, as the underlying cause of fdo bug 40591 should be fixed now.
* llvmpipe: Also reset the state in lp_scene_bin_resetJosé Fonseca2011-09-291-0/+1
| | | | Prevents segfaults when a opaque tile is found without state change.
* llvmpipe: Prevent segfault during fs variant cache shrinking.José Fonseca2011-09-291-4/+15
|
* tools/trace: Dump NULL literally.José Fonseca2011-09-291-0/+4
| | | | Instead of None.
* st/mesa: remove some old GetTexImage() codeBrian Paul2011-09-291-31/+5
| | | | | | | | We can use the core Mesa code for glGetTexImage() since it handles the image mapping/unmapping now. We'll keep the decompress_with_blit() path in the hope that it's faster than core Mesa's software decompression code. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41312
* winsys/radeon: remove redundant member radeon_bo::sizeMarek Olšák2011-09-293-8/+5
| | | | It's part of pb_buffer already.
* winsys/radeon: simplify updating GEM domains for relocationsMarek Olšák2011-09-291-10/+2
|
* winsys/radeon: simplify passing GEM domains through to GEM_CREATEMarek Olšák2011-09-292-25/+13
|
* r300g: remove useless variables in some structuresMarek Olšák2011-09-294-29/+12
|
* r300g: simplify the immd_is_good_idea functionMarek Olšák2011-09-291-26/+2
|
* configure.ac: unduplicate gallium directoriesMarek Olšák2011-09-291-4/+4
| | | | It may happen when two drivers share one winsys.
* r600g: convert if (query->type) into switch statementsMarek Olšák2011-09-291-26/+54
|
* gallium/docs: update d3d11ddi.txtMarek Olšák2011-09-291-22/+11
|
* st/mesa: don't compute index buffer bounds for per-instance dataMarek Olšák2011-09-291-3/+5
|
* glsl 1.30: Fix numerical instabilities in asinhPaul Berry2011-09-281-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The formula we were previously using for asinh: asinh x = ln(x + sqrt(x * x + 1)) is numerically unstable: when x is a large negative value, the quantity x + sqrt(x * x + 1) is a small positive value (on the order of 1/(2|x|)). Since the logarithm function is very sensitive in this range, any error in the computation of the square root manifests as a large error in the result. This patch changes to the equivalent formula: asinh x = sign(x) * ln(abs(x) + sqrt(x * x + 1)) which is only slightly more expensive to compute, and is numerically stable for all x. Fixes piglit tests spec/glsl-1.30/execution/built-in-functions/[fv]s-asinh-*. Reviewed-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix signed/unsigned sscanf() warning in _mesa_override_glsl_version()Brian Paul2011-09-281-1/+1
|
* st/mesa: include version.h and fix _mesa_override_glsl_version() callBrian Paul2011-09-281-1/+2
|
* glsl: Add support for constant expression evaluation on trunc().Eric Anholt2011-09-281-0/+2
| | | | | | | Fixes the glsl-1.30/compiler/built-in-functions/trunc-* tests under 1.30. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Add support for bit-shift operations.Eric Anholt2011-09-281-1/+7
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add missing _mesa_sizeof_glsl_type() for UNSIGNED_INT.Eric Anholt2011-09-281-0/+1
| | | | | | | | Somehow we managed to get the unsigned int vectors, but not scalar. Fixes _mesa_problem complaints in piglit's uint tests. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add support for bit-shift operations.Eric Anholt2011-09-281-1/+7
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix assertion checking types of constant bitshift expressions.Eric Anholt2011-09-281-1/+3
| | | | | | | | Bitshifts are one of the rare places that GLSL allows mixed base types without an implicit conversion occurring. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ir_to_mesa: Don't assertion fail on remaining GLSL 1.30 ops.Eric Anholt2011-09-281-2/+10
| | | | | | | | | | For hardware drivers, we only have ir_to_mesa called for the purposes of potential swrast fallbacks (basically never on a 1.30 driver), which we don't really care about. This will allow 1.30 to be implemented without rewriting swrast for it. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: don't intepolate clip distances on pre-GEN6.Paul Berry2011-09-281-2/+8
| | | | | | | | | | | | | On pre-GEN6 chips, the VUE slots set aside for clip distance aren't actually used, so there is no reason for the clipper to waste time interpolating them. When commit 62bad54727690bff5ed42a74272e7822fd36cdb6 changed the enum value used to represent these VUE slots, that caused the clipper to start interpolating them as an accidental side effect. This patch reverts to the old clipper behavior. Reviewed-by: Kenneth Graunke <[email protected]>
* i965 new VS: Fix bugs in pre-GEN6 psiz/flags computationPaul Berry2011-09-281-5/+5
| | | | | | | | | | | | | | | | | | This patch corrects two errors in the computation of the psiz/flags VUE slot on pre-GEN5 when using the new VS backend: - The clip flags (which should be stored in the w component of the first VUE slot) were being accidentally duplicated in all other components of that VUE slot, causing partially clipped triangles to sometimes disappear completely. - The OR instruction wasn't being stored in "inst", causing the BRW_PREDICATE_NORMAL flag to be applied to the wrong instruction. This patch fixes regressions in clipping behavior when using shaders on GEN4-5. Reviewed-by: Kenneth Graunke <[email protected]>
* i965 new VS: Fix src_reg(uint32_t) constructor.Paul Berry2011-09-281-1/+1
| | | | | | | | | This constructor was storing its argument in the wrong field of the "imm" enum, resulting in it being converted to a float when it should have remained an unsigned integer. This was preventing clipping from working properly on pre-GEN6. Reviewed-by: Kenneth Graunke <[email protected]>
* i965 new VS: don't share clip plane constants in pre-GEN6Paul Berry2011-09-286-43/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | In pre-GEN6, when using clip planes, both the vertex shader and the clipper need access to the client-supplied clip planes, since the vertex shader needs them to set the clip flags, and the clipper needs them to determine where to insert new vertices. With the old VS backend, we used a clever optimization to avoid placing duplicate copies of these planes in the CURBE: we used the same block of memory for both the clipper and vertex shader constants, with the clip planes at the front of it, and then we instructed the clipper to read just the initial part of this block containing the clip planes. This optimization was tricky, of dubious value, and not completely working in the new VS backend, so I've removed it. Now, when using the new VS backend, separate parts of the CURBE are used for the clipper and the vertex shader. Note that this doesn't affect the number of push constants available to the vertex shader, it simply causes the CURBE to occupy a few more bytes of URB memory. The old VS backend is unaffected. GEN6+, which does clipping entirely in hardware, is also unaffected. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix a hardcoded user clip plane count.Paul Berry2011-09-281-1/+1
| | | | | | | | | Now that i965 supports 8 clip planes instead of 6, the size of the brw_vs_compile::userplane array needs to be increased to 8. Changed the array size to MAX_CLIP_PLANES so that if the number changes again in the future, this array size won't be missed. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: allow for nonconsecutive elements of gl_ClipDistance to be enabled.Paul Berry2011-09-283-4/+38
| | | | | | | | | | | | | | | | | | | | | | When using user-defined clipping planes, the i965 driver compacts the array of clipping planes so that disabled clipping planes do not appear in it--this saves precious push constant space and makes it easier to generate the pre-GEN6 clip program. As a result, when enabling clipping planes in GEN6+ hardware, we always enable clipping planes 0 through n-1 (where n is the number of clipping planes enabled), regardless of which clipping planes the user actually requested. However, we can't do this when using gl_ClipDistance, because it would be prohibitively complex to compact the gl_ClipDistance array inside the user-supplied vertex shader. So, when enabling clipping planes in GEN6+ hardware, if gl_ClipDistance is in use, we need to pass the user-supplied enable flags directly through to the hardware rather than just enabling the first n planes. Fixes Piglit test vs-clip-distance-enables. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use 4 bits to store nr_userclip in brw_clip.h.Paul Berry2011-09-281-2/+1
| | | | | | | | | | | | | | | Since the i965 driver supports 8 clipping planes now, we need 4 bits to store the number of user clipping planes, not 3. In theory this isn't strictly necessary, since brw_clip.h is only used on pre-GEN6, and pre-GEN6 only advertises support for 6 clipping planes, but it seems wise to err on the safe side. In the process I removed the pad0 element of struct brw_clip_prog_key--it doesn't seem necessary because the compiler automatically inserts padding if needed. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Remove unused function get_glsl_version()Chad Versace2011-09-281-16/+0
| | | | | | | | It was replaced by _mesa_override_glsl_version(). Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa: Allow overriding GLSL version with environment variableChad Versace2011-09-287-1/+35
| | | | | | | | | | | | | | Override the context's GLSL version if the environment variable MESA_GLSL_VERSION_OVERRIDE is set. Valid values for MESA_GLSL_VERSION_OVERRIDE are integers, such as "130". MESA_GLSL_VERSION_OVERRIDE has the same behavior as INTEL_GLSL_VERSION, except that it applies to all drivers, not just Intel's. Since the former supercedes the latter, this patch disables the latter. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* st/mesa: substitute argument to guess_base_level_size() callBrian Paul2011-09-281-1/+1
| | | | | stObj->base.BaseLevel and firstImage->base.Level have the same value but the later looks more consistent in the function call.
* mesa: fix signed/unsigned warning in sscanf()Brian Paul2011-09-281-1/+1
|