summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium/util: Fix parsing of options with underscore.José Fonseca2012-06-271-1/+1
| | | | | | | | For example GALLIVM_DEBUG=no_brilinear which was being parsed as two options, "no" and "brilinear".
* gallivm: Added a generic lp_build_print_value which prints a LLVMValueRef.James Benton2012-06-272-117/+117
| | | | | | | | Updated lp_build_printf to share common code. Removed specific lp_build_print_vecX. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i915g: Implement sRGB texturesStéphane Marchesin2012-06-265-12/+128
| | | | | | | | Since we don't have them in hw we emulate them in the shader. Although not recommended by the spec it is legit. As a side effect we also get GL 2.1. I think this is as far as we can take the i915.
* svga: return 120 for PIPE_CAP_GLSL_FEATURE_LEVELBrian Paul2012-06-261-1/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: return 120 for PIPE_CAP_GLSL_FEATURE_LEVELBrian Paul2012-06-261-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* r600g: enable DUAL_EXPORT mode when possible on r6xx/r7xxJerome Glisse2012-06-273-18/+57
| | | | | | | DUAL_EXPORT can be enabled on r6xx/r7xx when all CBs use 16-bit export and there is no depth/stencil export. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: enable DUAL_EXPORT mode when possibleVadim Girlin2012-06-274-6/+55
| | | | | | | | It seems DUAL_EXPORT on evergreen may be enabled when all CBs use 16-bit export mode (EXPORT_4C_16BPC), also there should be at least one CB, and the PS shouldn't export depth/stencil. Signed-off-by: Vadim Girlin <[email protected]>
* r600g: avoid unnecessary shader exports v2Vadim Girlin2012-06-276-28/+41
| | | | | | | | | | | | In some cases TGSI shader has more color outputs than the number of CBs, so it seems we need to limit the number of color exports. This requires different shader variants depending on the nr_cbufs, but on the other hand we are doing less exports, which are very costly. v2: fix various piglit regressions Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: cache shader variants instead of rebuilding v3Vadim Girlin2012-06-275-94/+217
| | | | | | | | | | | | | | | | | | | Shader variants are stored in the list, the key for lookup is based on the states that require different hw shaders - currently it's rctx->two_side (all gpus) and rctx->nr_cbufs (evergreen/cayman, when writes_all property is set). v2: - use simple list instead of keymap as suggested by Marek on irc - call r600_adjust_gprs from r600_bind_vs_shader for r6xx/r7xx (r600_shader_select isn't used for vertex shaders currently) v3: - fix call to r600_adjust_gprs - do it after updating current shader Improves performance for some apps, e.g. FlightGear - see https://bugs.freedesktop.org/show_bug.cgi?id=50360 Signed-off-by: Vadim Girlin <[email protected]>
* svga: handle missing PIPE_CAP_x queriesBrian Paul2012-06-261-9/+14
| | | | | | And fix incorrect error message for a bad shader type/number. Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: handle more PIPE_CAP_x queriesBrian Paul2012-06-261-4/+48
| | | | | | | | | As with the previous commit for softpipe. v2: remove 'default' case to get compile-time warning Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* softpipe: handle more PIPE_CAP_x queriesBrian Paul2012-06-261-3/+31
| | | | | | | | | | These all return zero. Add a debug_printf() to catch the default case so we don't accidently mishandle something important in the future. v2: remove 'default' case to get compile-time warning Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* svga: return 1 for PIPE_CAP_MIXED_COLORBUFFER_FORMATSBrian Paul2012-06-261-1/+3
| | | | | | | | | | | This is actually required for GL_ARB_framebuffer_object, but the state tracker doesn't currently check it. Direct3D 9 allows mixed format color buffers with some restrictions. Setting this allows Unigine Heaven 2.5 and 3.0 to run. Tested both on GL and D3D hosts. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* u2f_emit: Fix type parameter in LLVM call.Olivier Galibert2012-06-261-1/+1
| | | | | | | | The type is the destination type (i.e. float vector) and not the source type. Fixes piglit fs-{in,de}crement-uint. Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* st/wgl: Add a few more comments.José Fonseca2012-06-262-6/+38
|
* r600g: don't disable streamout if it hasn't been startedMarek Olšák2012-06-261-1/+1
|
* u_blitter: disable streamout before renderingMarek Olšák2012-06-261-0/+10
| | | | | | This fixes piglit EXT_transform_feedback tests: - intervening-read output - intervening-read prims_written
* st/wgl: 80-column wrappingBrian Paul2012-06-252-7/+12
|
* r600g: inline r600_blit_push_depth and use resource_copy_regionMarek Olšák2012-06-253-18/+11
| | | | | We are going to have a separate resource for depth texturing and transfers and this is just a transfer thing.
* r600g: split flushed depth texture creation and flushingMarek Olšák2012-06-255-16/+34
|
* llvmpipe: fix the LP_NO_RAST debug optionBrian Paul2012-06-254-24/+22
| | | | | | | | It was only no-oping the clear() function, not actual triangle rasterization. Move the no_rast field from lp_context down into lp_rasterizer so it's accessible where it's needed. Reviewed-by: Jose Fonseca <[email protected]>
* svga: init pointer to NULL to silence MSVC warningBrian Paul2012-06-221-1/+1
|
* clover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIRTom Stellard2012-06-221-1/+1
| | | | | | | | | | | | | | $CLANG_RESOURCE_DIR is the directory that contains all resources needed by clang to compile programs. When clover uses clang to compile kernels it needs to specify a resource dir, so that clang can find its internal headers (e.g. stddef.h). clang defines $CLANG_RESOURCE_DIR as $CLANG_LIBDIR/clang/$CLANG_VERSION This patch adds the --with-clang-libdir option in order to accommodate clang intalls to non-standard locations, and it also adds a check to the configure script to verify that $CLANG_RESOURCE_DIR/include contains the necessary header files.
* draw: Handle the case when there isn't a fragment shader.Olivier Galibert2012-06-221-10/+17
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* r600g: Unify SURFACE_SYNC packet emission for 3D and computeTom Stellard2012-06-213-101/+30
| | | | | | Drop the compute specific evergreen_set_buffer_sync() function and instead use the r600_surface_sync_command atom for emitting SURFACE_SYNC packets.
* r600g: Enable reusing of compute stateTom Stellard2012-06-211-6/+9
|
* r600g: Fix reading vtx instruction offset from bytestreamTom Stellard2012-06-211-1/+1
|
* radeon/llvm: Turn on the BitExtract peephole optimizationTom Stellard2012-06-212-5/+32
| | | | | Thie BitExtract optimization folds a mask and shift operation together into a single instruction (BFE_UINT).
* radeon/llvm: Lower ROTL to BIT_ALIGNTom Stellard2012-06-216-1/+54
|
* radeon/llvm: Use the VLIW Scheduler for R600->NITom Stellard2012-06-2112-8/+75
| | | | | | | | | | | | | | | | | | | It's not optimal, but it's better than the register pressure scheduler that was previously being used. The VLIW scheduler currently ignores all the complicated instruction groups restrictions and just tries to fill the instruction groups with as many instructions as possible. Though, it does know enough not to put two trans only instructions in the same group. We are able to ignore the instruction group restrictions in the LLVM backend, because the finalizer in r600_asm.c will fix any illegal instruction groups the backend generates. Enabling the VLIW scheduler improved the run time for a sha1 compute shader by about 50%. I'm not sure what the impact will be for graphics shaders. I tested Lightsmark with the VLIW scheduler enabled and the framerate was about the same, but it might help apps that use really big shaders.
* automake: Convert src/gallium/Makefile to automake.Eric Anholt2012-06-213-12/+23
|
* make: Fold ASM_CFLAGS into DEFINES.Eric Anholt2012-06-213-3/+0
| | | | | | Every place that uses ASM_FLAGS already uses DEFINES. Not including it in DEFINES is just a way to screw up potential users, as I've done several times while working on the build system.
* nv50: fix buffer reuse issuesMarcin Slusarz2012-06-202-0/+18
| | | | | | | | | | 1) We need to insert a barrier between consecutive transform feedback calls. 2) VBO cache needs to be flushed when TFB output is used as VBO draw input. Fixes Piglit test EXT_transform_feedback/immediate-reuse. Thanks to Christoph Bumiller for pointing out bugs in previous versions of this patch.
* st/vdpau: use template size as default for source_rect.Christian König2012-06-201-3/+10
| | | | | | Fixes alignment problems with flash player. Signed-off-by: Christian König <[email protected]>
* st/vdpau: clear Cb&Cr with 0.5fChristian König2012-06-201-2/+5
| | | | | | That makes the output black in case of decoding errors. Signed-off-by: Christian König <[email protected]>
* llvmpipe: Add vertex id support.Olivier Galibert2012-06-194-19/+42
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Simplify and fix system variables fetch.Olivier Galibert2012-06-194-78/+33
| | | | | | | | | | | | | | The system array values concept doesn't really because it expects the system values to be fixed per call, which is wrong for gl_VertexID and iffy for gl_SampleID. So this patch does two things: - kill the array, have emit_fetch_system_value directly pick the values it needs (only gl_InstanceID for now, as the previous code) - correctly handle the expected type in emit_fetch_system_value Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw: fix flat shading and screen-space linear interpolation in clipperOlivier Galibert2012-06-191-31/+113
| | | | | | | | | | | | | | | This includes: - picking up correctly which attributes are flatshaded and which are noperspective - copying the flatshaded attributes when needed, including the non-built-in ones - correctly interpolating the noperspective attributes in screen-space instead than in a 3d-correct fashion. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: Offset is not to be applied to the layer parameter of array ↵Olivier Galibert2012-06-191-2/+2
| | | | | | | texture fetches. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g: fix z/stencil texture creation v2Jerome Glisse2012-06-191-15/+17
| | | | | | | | | | z or stencil texture should not be created with the z/stencil flags for surface creation as they are intended to be bound as texture. v2: remove broken code Signed-off-by: Jerome Glisse <[email protected]>
* radeon/llvm: Fix CR/LF in Processors.tdTörök Edwin2012-06-191-17/+17
| | | | Signed-off-by: Tom Stellard <[email protected]>
* radeon/llvm: Fix sin/cos codegen on R700Török Edwin2012-06-191-19/+24
| | | | | | | | | | Based on https://bugs.freedesktop.org/show_bug.cgi?id=50317#c4 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=50316 https://bugs.freedesktop.org/show_bug.cgi?id=50317 Signed-off-by: Tom Stellard <[email protected]>
* gallium: Add PIPE_CAP_START_INSTANCEFredrik Höglund2012-06-1910-2/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* scons: Do not build svga if using Solaris Studio C compiler.Vinson Lee2012-06-182-0/+8
| | | | | | | | Solaris Studio C compiler does not support anonymous structs and anonymous unions. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon/llvm: Update comment in AMDGPU.tdTom Stellard2012-06-181-2/+3
|
* radeon/llvm: Remove unused AMDIL TableGen definitonsTom Stellard2012-06-1818-6140/+26
|
* radeon/llvm: Eliminate getRegClassFromType() functionTom Stellard2012-06-181-42/+1
| | | | We can use TargetLowering::getRegClassFor() instead.
* radeon/llvm: Remove deadcode from AMDILISelLowering.cppTom Stellard2012-06-184-1687/+0
|
* gallium: Add support for Solaris Studio C++ compiler.Vinson Lee2012-06-181-1/+5
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Implement cylindrical wrapping.James Benton2012-06-183-4/+82
| | | | | | Tested against mesa demos cylwrap and dx9 DCT address.exe which now passes 100%. Signed-off-by: José Fonseca <[email protected]>