summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium/tests: update .gitignore filesAndreas Boll2012-11-212-0/+7
|
* st/vdpau: Fix vlVdpVideoSurfaceSize for interlaced buffersMaarten Lankhorst2012-11-171-2/+2
| | | | Signed-off-by: Maarten Lankhorst <[email protected]>
* util: Only use open coded snprintf for MSVC.Vinson Lee2012-11-162-3/+3
| | | | | | | | | | | | MinGW has snprintf. The patch fixes these warnings with the MinGW SCons build. src/gallium/auxiliary/util/u_snprintf.c:459:1: warning: no previous prototype for ‘util_vsnprintf’ [-Wmissing-prototypes] src/gallium/auxiliary/util/u_snprintf.c:1436:1: warning: no previous prototype for ‘util_snprintf’ [-Wmissing-prototypes] Signed-off-by: Vinson Lee <[email protected]> Tested-by: Brian Paul <[email protected]>
* clover: Fix build with clang 3.2Tom Stellard2012-11-161-1/+6
|
* r300/compiler: Avoid generating MOV instructions for invalid IMM swizzles v2Tom Stellard2012-11-161-4/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an instruction reads from a constant register that contains immediates using an invalid swizzle, we can avoid generating MOV instructions to fix up the swizzle by loading the immediates into a different constant register that can be read using a valid swizzle. This only affects r300 and r400 cards. For example: CONST[1] = { -3.5000 3.5000 2.5000 1.5000 } MAD temp[4].xy, const[0].xy__, const[1].xz__, input[0].xy__; ========== Before this change would be lowered to: ========= CONST[1] = { -3.5000 3.5000 2.5000 1.5000 } MOV temp[0].x, const[1].x___; MOV temp[0].y, const[1]._z__; MAD temp[4].xy, const[0].xy__, temp[0].xy__, input[0].xy__; ========== After this change is lowered to: =============== CONST[1] = { -3.5000 3.5000 2.5000 1.5000 } CONST[2] = { 0.0000 -3.5000 2.5000 0.0000 } MAD temp[4].xy, const[0].xy__, const[2].yz__, input[0].xy__; ============================================================ This change reduces one of the Lightsmark shaders from 133 to 91 instructions. v2: - Fix crash caused by swizzles with only inline constants.
* radeonsi: clean up some magic numbersAlex Deucher2012-11-161-1/+2
| | | | | Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: emit PA_SC_RASTER_CONFIGAlex Deucher2012-11-161-0/+11
| | | | | | | | | | | | | Use per asic golden values. Programming this register doesn't seem to be strictly necessary on SI, but programming it wrong leads to rendering issues or reduced performance so just go ahead and program the golden values explicitly to avoid any potential problems down the road. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* [PATCH] makefiles: use configured name for -ldrm* where possibleMaarten Lankhorst2012-11-1612-24/+24
| | | | | | | | | | | | | For precise lts support I had to do some magic with the library names, which works fine as long as the libraries from pkg-config are used. The parts with src/gallium/targets/va-*/Makefile will not apply on the master branch, but do apply to the 9.0 branch. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Matt Turner <[email protected]>
* radeonsi: remove new asserts and replace with warningsAlex Deucher2012-11-151-2/+6
| | | | | | Fixes piglit regressions. Signed-off-by: Alex Deucher <[email protected]>
* util/u_debug: Fix DEBUG_NAMED_VALUE.José Fonseca2012-11-151-1/+1
| | | | "#__symbol" doesn't work with nested macro expansions, at least not on gcc.
* draw: fix crashes with out-of-bounds indicesRoland Scheidegger2012-11-152-6/+9
| | | | | | | | | | | | | | The passthrough pipeline needs to check index values (which might be passed through) as they can be invalid (which causes crashes and various assertion failures if the clip code runs). Obviously, rendering won't be well-defined, but those bogus indices might come directly from apps. There were already debug printfs which reported the out-of-bounds indices but we really ought to not crash. While checking at that point doesn't seem like the most efficient solution, it seems there isn't really another appropriate function to do it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* radeonsi: cleanup si_db()Alex Deucher2012-11-152-12/+12
| | | | | | | | Clean up a few magic numbers and rework the code a bit. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: assert the CB format is valid (v2)Alex Deucher2012-11-151-2/+3
| | | | | | | | | | | Assert the the CB format is valid and default to the INVALID hw format rather than ~0U when the format doesn't match for non-debug builds. v2: use INVALID hw format rather than ~0U Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: assert that the DB format is valid (v2)Alex Deucher2012-11-151-8/+5
| | | | | | | | | | | Assert that the DB format is valid and default to the INVALID hw format rather than ~0U when the format doesn't match for non-debug builds. v2: use INVALID hw format rather than ~0U Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium: fix some function comments in p_context.hDmitry Cherkassov2012-11-151-3/+2
| | | | | Signed-off-by: Dmitry Cherkassov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeonsi: Set STENCILOPVAL fields to 1.Michel Dänzer2012-11-141-2/+4
| | | | | | | | This is necessary for backwards compatibility with pre-SI for stencil. Fixes a number of stencil related piglit tests, and real apps using stencil. Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Bump SI_PM4_MAX_DW.Michel Dänzer2012-11-141-1/+1
| | | | | | | Fixes assertion failure with Mesa demo glsl/samplers. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Handle TGSI TXL opcode.Michel Dänzer2012-11-141-0/+7
| | | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Handle TGSI TXB opcode.Michel Dänzer2012-11-141-0/+7
| | | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: use LINEAR_ALIGNED tiling for 1D array textures and if height0 <= 3Marek Olšák2012-11-131-1/+3
| | | | Reviewed-by: Alex Deucher <[email protected]>
* auxillary: Append LLVM_CXXFLAGS to CXXFLAGSTom Stellard2012-11-131-0/+1
|
* r300g: don't call buffer_unmap in draw functionsMarek Olšák2012-11-131-11/+0
| | | | It's been a no-op anyway.
* r300g: fix crash since the set_vertex_buffers(start_slot) changeMarek Olšák2012-11-131-6/+7
|
* r600g: untiled window-system buffers should be LINEAR_ALIGNEDMarek Olšák2012-11-131-1/+1
| | | | | | though I guess the DDX allocates them as LINEAR_GENERAL Reviewed-by: Alex Deucher <[email protected]>
* r600g: use LINEAR_ALIGNED tiling for 1D texturesMarek Olšák2012-11-131-1/+2
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: use LINEAR_ALIGNED tiling for staging textures, reorder the codeMarek Olšák2012-11-131-6/+10
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove redundant parameter in r600_init_surfaceMarek Olšák2012-11-131-6/+4
|
* gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointersRoland Scheidegger2012-11-1214-63/+131
| | | | | | | | | This might have a slight overhead but handling mip offsets more like the width (and image) strides should make some things easier (mip level being just part of the offset calculation) later. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: always allocate whole miptrees not individual levelsRoland Scheidegger2012-11-122-60/+81
| | | | | | | | This is preparation work for using mip level offsets + base_ptr for texture sampling instead of per-mip pointers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* radeonsi: Implement alpha testing in pixel shader.Michel Dänzer2012-11-126-38/+52
| | | | Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Initialize uses_kill boolean from TGSI info.Michel Dänzer2012-11-121-0/+1
| | | | | | Fixes discarded pixels incorrectly updating the depth buffer. Signed-off-by: Michel Dänzer <[email protected]>
* gallium/u_blitter: handle PIPE_TEXTURE_CUBE_ARRAY in is_box_inside_resourceMarek Olšák2012-11-111-0/+6
|
* r600g: fix printk warningsDave Airlie2012-11-101-4/+4
| | | | | | | | | | | | | Brian reported seeing: r600_texture.c: In function ‘r600_texture_create_object’: r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ this should wrap over them fine. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: fix unused variable warning.Dave Airlie2012-11-101-1/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallium: fix unused cap warnings in drivers for cube map array cap.Dave Airlie2012-11-103-0/+3
| | | | Signed-off-by: Dave Airlie <[email protected]>
* r600g: add initial cube map array support (v2)Dave Airlie2012-11-109-15/+238
| | | | | | | | | | | | | | | | | | | | | This contains the evergreen support. Support is possible on rv670 upwards and the code in here should work, but it doesn't and I haven't debugged it to figure out why. Beyond just adding support for the cube map array sampling, r600 resinfo isn't conformant with the GL specification, which states the number of layers should be returned for the textureSize, so we have to track in an external constant buffer the layers for each sampler if we need them in the shader. v2: only update the sampler constants if the sampler views have changed, as suggested by Marek. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* u_blitter: fix cube array checkDave Airlie2012-11-101-1/+1
| | | | | | | | Pointed out by Marek on irc, no committing after beer! Signed-off-by: Dave Airlie <[email protected]>
* util/u_surface: Support 3D/array textures in util_resource_copy_region().José Fonseca2012-11-091-26/+44
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: Remove redundant draw_geometry_shader_delete().José Fonseca2012-11-092-8/+2
| | | | | | | draw_delete_geometry_shader() seems to be the real one. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* trace: Support geometry shaders.José Fonseca2012-11-091-115/+71
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.José Fonseca2012-11-091-12/+6
| | | | | | | | | | util_pack_z_stencil was being unconditionally invoked for all formats, causing an assertion failure for Z32_FLOAT_S8X24_UINT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* galahad: Support geometry shader / stream-output methods.José Fonseca2012-11-091-82/+110
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe,util: Fix blending of R and RG formats.José Fonseca2012-11-091-25/+1
| | | | | | | | | Alpha is also 1 for formats like R32G32_FLOAT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.José Fonseca2012-11-091-3/+3
| | | | | | | | | We must multiply the factor against the destination, not the source. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: Lift the requirement of indirection being done by ADDR register.José Fonseca2012-11-091-1/+0
| | | | | | | For drivers with native integer / SM4 support this is just an hindrance. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Fix reduction of line adjacency primitives.José Fonseca2012-11-091-0/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Handle adjacency primitives.José Fonseca2012-11-091-0/+46
| | | | | | | | | | | | Not fully tested. Based on diagrams from http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124.aspx#Primitive_Adjacency v2: Fix based on Brian's feedback. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_rect: Make it C++ safe.José Fonseca2012-11-091-0/+15
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* u_blitter: don't create fragment program for cube maps unless supported.Dave Airlie2012-11-091-1/+6
| | | | | | should fix http://bugs.freedesktop.org/56906 Signed-off-by: Dave Airlie <[email protected]>
* svga: Fix memory leak in svga_buffer_transfer_map.Vinson Lee2012-11-081-0/+2
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>