summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* r600g: add cs memory usage accounting and limit it v3Jerome Glisse2013-01-315-1/+59
| | | | | | | | | | | | | | | | | | | We are now seing cs that can go over the vram+gtt size to avoid failing flush early cs that goes over 70% (gtt+vram) usage. 70% is use to allow some fragmentation. The idea is to compute a gross estimate of memory requirement of each draw call. After each draw call, memory will be precisely accounted. So the uncertainty is only on the current draw call. In practice this gave very good estimate (+/- 10% of the target memory limit). v2: Remove left over from testing version, remove useless NULL checking. Improve commit message. v3: Add comment to code on memory accounting precision Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: fix htile buffer leakMarek Olšák2013-01-311-0/+1
| | | | NOTE: This is a candidate for the 9.1 branch.
* nv50,nvc0: fix/enable texture buffer objectsChristoph Bumiller2013-01-305-33/+42
|
* llvmpipe: Don't advertise S8_UNORM (with feeble attempt at supporting it).José Fonseca2013-01-292-36/+46
| | | | | | | | | | | | | | S8_UNORM was inadvertedly supported together with Z16_UNORM. I tried to update the code to accomodate stencil-only -- it seemed a simple thing to do -- but "fbo-stencil clear GL_STENCIL_INDEX8" still fails, and it's not worth debugging. Therefore although this change tries to update for S8_UNORM, it also disables it completely. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Fix deferred depth writes for Z16_UNORM.José Fonseca2013-01-291-1/+6
| | | | | | | | | | This special path hadn't been exercised by my earlier testing, and mask values weren't being properly truncated to match the values. This change fixes that. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Support Z16_UNORM as depth-stencil format.José Fonseca2013-01-294-22/+43
| | | | | | | | | | Simply by adjusting the vector element width after/before reading/writing the depth-stencil values. Ran several GL_DEPTH_COMPONENT16 piglit tests without regressions. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* r600g: use uint64_t instead of unsigned long for proper 32bits cpu supportJerome Glisse2013-01-285-16/+16
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: real fix for non 3.8 kernelJerome Glisse2013-01-281-3/+5
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* r600g: fix segfault with old kernel9.1-branchpointJerome Glisse2013-01-285-11/+23
| | | | | | | Old kernel do not have dma support, patch pushed were missing some of the check needed to not use dma. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: improve inputs/interpolation handling with llvm backendVadim Girlin2013-01-284-209/+151
| | | | | | | | | | Get rid of special handling for reserved regs. Use one intrinsic for all kinds of interpolation. v2[Vincent Lejeune]: Rebased against current master Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Vadim Girlin <[email protected]>
* r600g: Add ar_chan member to struct r600_bytecodeTom Stellard2013-01-283-0/+4
| | | | | | | | r600_bytecode::ar_chan stores the register channel for the value that will be loaded into the AR register. At the moment, this field is only used by the LLVM backend. The default backend always sets ar_chan = 0.
* r600g: More robust checks for MOVA_INT instructionsTom Stellard2013-01-281-8/+35
|
* r600g/llvm: Add dummy export for vs outputVincent Lejeune2013-01-281-2/+20
| | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59588 Reviewed-by: Tom Stellard <[email protected]>
* r600g: Fix building with --enable-r600-llvm-compilerTom Stellard2013-01-281-3/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=59877
* r600g: don't emit WAIT_UNTIL on cayman/TN (v2)Alex Deucher2013-01-281-9/+28
| | | | | | | | | | | | | It shouldn't be needed and older kernels don't support it. v2: Replace with PS partial flush as before. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59945 Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: add async for staging buffer upload v2Jerome Glisse2013-01-2812-17/+595
| | | | | | v2: Add virtual address to dma src/dst offset for cayman Signed-off-by: Jerome Glisse <[email protected]>
* r600g: add multi ring support with dma as first second ring v4Jerome Glisse2013-01-2814-176/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | We keep track of ring emission order in a stack, whenever we need to flush we empty the stack in a fifo order. There is few helpers function for bo mapping and other ring activities that will make sure that the ring stack is properly flush and submitted. v2: fix st flush path, and other flush path to properly flush all rings if necessary v3: - improve name of ring helpers - make sure that each time a cs is gona be written it endup at top of the stack to avoid any issue such as : STACK[0] = dma (withbo A,B) STACK[1] = gfx (withbo C,D) Now if code try to emit a dma command relative to bo C or D it will start writting cmd stream into the cs and once it reach the point where it adds relocation it will flush. At that point the cs will have cmd that don't have proper relocation into the relocation buffer and kernel will just refuse to run. v4: - Drop the stack idea as it turn out there is no way to use it or benefit from it. Any time the driver start command on other ring, it always need to flush the previous ring. So make code simpler by not using a stack. Signed-off-by: Jerome Glisse <[email protected]>
* radeon/winsys: add dma ring support to winsys v3Jerome Glisse2013-01-283-3/+3
| | | | | | | | | | | | | | | | | | | | Add ring support, you can create a cs for each ring. DMA ring is bit special regarding relocation as you must emit as much relocation as there is use of the buffer. v2: - Improved comment on relocation changes - Use a single thread to queue cs submittion this simplify driver code while not impacting performances. Rational for this is that you have to wait for all previous submission to have completed so there was never a case while we could have 2 different thread submitting a command stream at the same time. This code just consolidate submission into one single thread per winsys. v3: - Do not use semaphore for empty queue signaling, instead use cond var. This is because it's tricky to maintain an even number of call to semaphore wait and semaphore signal (the number of cs in the stack would for instance make that number vary). Signed-off-by: Jerome Glisse <[email protected]>
* gallivm,draw,llvmpipe: mass rename of unit->texture_unit/sampler_unitRoland Scheidegger2013-01-281-16/+16
| | | | | | | | | | | Make it obvious what "unit" this is (no change in functionality). draw still uses "unit" in places where it changes the shader by adding texture sampling itself - it seems like this can't work with shaders using dx10-style sample opcodes (can't mix gl-style and dx10-style sample instructions in a shader). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: split sampler and texture stateRoland Scheidegger2013-01-289-84/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the sampler interface to use separate sampler and texture (sampler_view) state. This is needed to support dx10-style sampling instructions. This is not quite complete since both draw/llvmpipe don't really track textures/samplers independently yet, as well as the gallivm code not quite using the right sampler or texture index respectively (but it should work for the sampling codes used by opengl). We are however losing some optimizations in the process, apply_max_lod will no longer work, and we potentially could end up with more (unnecessary) recompiles (if switching textures with/without mipmaps only so it shouldn't be too bad). v2: don't use different callback structs for sampler/sampler view functions (which just complicates things), fix up sampling code to actually use the right texture or sampler index, and similar for llvmpipe/draw actually distinguish between samplers and sampler views. v3: fix more of PIPE_MAX_SAMPLER / PIPE_MAX_SHADER_SAMPLER_VIEWS mismatches (both in draw and llvmpipe), based on feedback from José get rid of unneeded static sampler derived state.(which also fixes the only 2 piglit regressions due to a forgotten assignment), fix comments based on Brian's feedback. v4: remove some accidental unrelated whitespace changes Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nouveau: don't try to use push_data if it's not implementedChristoph Bumiller2013-01-271-0/+3
|
* r600g: add more cases for copying unsupported formats to resource_copy_regionMarek Olšák2013-01-261-0/+12
| | | | just in case a new format is added to gallium
* r600g: don't use radeon_surface_level::npix_x/y/zMarek Olšák2013-01-264-32/+27
| | | | | | | npix_x/y/z is wrong with NPOT textures, since it's always aligned to POT if the level is non-zero, so we can't use that. This fixes piglit/spec/EXT_texture_shared_exponent/fbo-generatemipmap-formats.
* r600g: fix compile warnings in r600_cp_dma_copy_buffer on 32-bit gccMarek Olšák2013-01-262-4/+4
|
* r600g: fix up CP DMA for VM on cayman and TNAlex Deucher2013-01-252-6/+9
| | | | | | | Need to add the virtual address. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()Brian Paul2013-01-251-1/+1
| | | | | | | | | | | | | | Fixes a crash when the Redway3D Turbine demo exits. We've made this change in other places in the past. The root issue is texture objects are being shared by multiple contexts and sampler views get shared too. Sampler views have a context pointer and if that context gets deleted we may try to reference that context when finally deleting the sampler view. pipe_sampler_view_release() avoids this problem because it takes an explicit context. Reviewed-by: Zack Rusin <[email protected]>
* svga: add NULL pointer check in svga_create_sampler_state()Brian Paul2013-01-251-0/+3
| | | | Note: This is a candidate for the 9.0 branch.
* softpipe: add casts to silence MSVC warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* r600g: Don't build llvm_wrapper.cpp when we aren't using LLVMTom Stellard2013-01-251-1/+3
| | | | | | | | | | | | | | | | | | We were using the NEED_RADEON_GALLIUM conditional to decide whether or not to build llvm_wrapper.cpp, which is required for using the LLVM backend. llvm_wrapper.cpp needs to be linked against the LLVM IPO libary and this library is only added to LLVM_LIBS if either opencl or the r600-llvm-compiler is enabled. The NEED_RADEON_GALLIUM conditional is set to true when enabling the radeonsi driver, so if the radeonsi and r600 drivers are enabled without also enabling opencl or r600-llvm-compiler, llvm_wrapper.cpp will be built, but the IPO library won't be added to LLVM_LIBS. This was causing unresolved symbol errors when buiding with this configuration. https://bugs.freedesktop.org/show_bug.cgi?id=59831 Tested-by: Alex Deucher <[email protected]>
* configure.ac: Compute the required llvm static libraries only onceTom Stellard2013-01-241-4/+0
| | | | | | | | | | | In order to determine which static LLVM libraries are needed we pass a list of components to llvm-config and it generates the list of library dependencies for us. The advantage of only calling llvm-config one time is that it can determine if two components depend on the same library and then add it to the output list only once. The old practice of having each driver call llvm-config to add its own dependencies to $(LLVM_LIBS) caused many libraries to be added to this variable multiple times.
* radeonsi: Fall back to dummy pixel shader instead of trying indirect addressing.Michel Dänzer2013-01-241-0/+5
| | | | | | | | Indirect addressing isn't fully handled yet. Fixes crashes with piglit tests using indirect addressing. Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: make sure copying of all texture formats is acceleratedMarek Olšák2013-01-242-59/+54
| | | | | | [ Cherry-picked from r600g commit 7c371f46958910dd2ca9487c89af1b72bbfdada9 ] Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Handle PIPE_FORMAT_L32A32_S/UINT for rendering.Michel Dänzer2013-01-241-0/+4
| | | | Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Make sure to use float number format for packed float colour formats.Michel Dänzer2013-01-241-2/+4
| | | | | | | | These aren't covered by UTIL_FORMAT_TYPE_FLOAT. Fixes 15 piglit (sub)tests. Signed-off-by: Michel Dänzer <[email protected]>
* nouveau/build: Fix build failures when drm is not in /usr/include.José Fonseca2013-01-223-3/+6
| | | | | | | Fixes failures to include libdrm/nouveau.h when drm is not installed in /usr/include. Reviewed-by: Matt Turner <[email protected]>
* radeon/llvm: Handle LP_CHAN_ALL in emit_fetch_immediate().Michel Dänzer2013-01-221-1/+11
| | | | | | | | Fixes piglit spec/ARB_sampler_objects/sampler-incomplete and spec/EXT_texture_swizzle/depth_texture_mode_and_swizzle. Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* r300g: add a workaround for the AA colorbuffer addressing bug on R500Marek Olšák2013-01-212-7/+42
|
* r300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cardsMarek Olšák2013-01-212-3/+6
| | | | because single-pipe cards have bigger CMASK RAM
* r300g: enable AA optimizations for the RGBA16F formatMarek Olšák2013-01-213-1/+11
|
* radeonsi: More assorted depth/stencil changes ported from r600g.Marek Olšák2013-01-217-136/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Squashed port of the following r600g commits: - Michel Dänzer ] commit 428e37c2da420f7dc14a2ea265f2387270f9bee1 Author: Marek Olšák <[email protected]> Date: Tue Oct 2 22:02:54 2012 +0200 r600g: add in-place DB decompression and texturing with DB tiling The decompression is done in-place and only the compressed tiles are decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F. The texture unit is programmed to use non-displayable tiling and depth ordering of samples, so that it can fetch the texture in the native DB format. The latest version of the libdrm surface allocator is required for stencil texturing to work. The old one didn't create the mipmap tree correctly. We need a separate mipmap tree for stencil, because the stencil mipmap offsets are not really depth offsets/4. There are still some known bugs, but this should save some memory and it also improves performance a little bit in Lightsmark (especially with low resolutions; tested with Radeon HD 5000). The DB->CB copy is still used for transfers. commit e2f623f1d6da9bc987582ff68d0471061ae44030 Author: Marek Olšák <[email protected]> Date: Sat Jul 28 13:55:59 2012 +0200 r600g: don't decompress depth or stencil if there isn't any commit 43e226b6efb77db2247741cc2057d9625a2cfa05 Author: Marek Olšák <[email protected]> Date: Wed Jul 18 00:32:50 2012 +0200 r600g: optimize uploading depth textures Make it only copy the portion of a depth texture being uploaded and not the whole 2D layer. There is also a little code cleanup. commit b242adbe5cfa165b252064a1ea36f802d8251ef1 Author: Marek Olšák <[email protected]> Date: Wed Jul 18 00:17:46 2012 +0200 r600g: remove needless wrapper r600_texture_depth_flush commit 611dd529425281d73f1f0ad2000362d4a5525a25 Author: Marek Olšák <[email protected]> Date: Wed Jul 18 00:05:14 2012 +0200 r600g: init_flushed_depth_texture should be able to report errors commit 80755ff56317446a8c89e611edc1fdf320d6779b Author: Marek Olšák <[email protected]> Date: Sat Jul 14 17:06:27 2012 +0200 r600g: properly track which textures are depth This fixes the issue with have_depth_texture never being set to false. commit fe1fd675565231b49d3ac53d0b4bec39d8bc6781 Author: Marek Olšák <[email protected]> Date: Sun Jul 8 03:10:37 2012 +0200 r600g: don't flush depth textures set as colorbuffers The only case a depth buffer can be set as a color buffer is when flushing. That wasn't always the case, but now this code isn't required anymore. commit 5a17d8318ec2c20bf86275044dc8f715105a88e7 Author: Marek Olšák <[email protected]> Date: Sun Jul 8 02:14:18 2012 +0200 r600g: flush depth textures bound to vertex shaders This was missing/broken. There are also minor code cleanups. commit dee58f94af833906863b0ff2955b20f3ab407e63 Author: Marek Olšák <[email protected]> Date: Sun Jul 8 01:54:24 2012 +0200 r600g: do fine-grained depth texture flushing - maintain a mask of which mipmap levels are dirty (instead of one big flag) - only flush what was requested at a given point and not the whole resource (most often only one level and one layer has to be flushed) Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: improve flushed depth texture handlingVadim Girlin2013-01-215-81/+100
| | | | | | | | | | | | | Use r600_resource_texture::flished_depth_texture for GPU access, and allocate it in the VRAM. For transfers we'll allocate texture in the GTT and store it in the r600_transfer::staging. Improves performance when flushed depth texture is frequently used by the GPU, e.g. in Lightsmark [ Ported from r600g commit 37708479608af877986b76302a9c92611d1e23d0 ] Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Assorted depth/stencil changes ported from r600g.Marek Olšák2013-01-215-56/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ Squashed port of the following r600g commits: - Michel Dänzer ] commit c1e8c845ea9c6f843cc5bba5974668c007799bbc Author: Marek Olšák <[email protected]> Date: Sat Jul 7 19:10:00 2012 +0200 r600g: inline r600_hw_copy_region commit 4891c5dc64ccd8cf2bf8a8550ae23e1a61806a7d Author: Marek Olšák <[email protected]> Date: Mon Jun 25 22:53:21 2012 +0200 r600g: inline r600_blit_push_depth and use resource_copy_region We are going to have a separate resource for depth texturing and transfers and this is just a transfer thing. commit da98bb6fc105e1a2f688a1713ca9e50f0ac8fbed Author: Marek Olšák <[email protected]> Date: Mon Jun 25 12:45:32 2012 +0200 r600g: split flushed depth texture creation and flushing Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Enable 1D tiling for non-depth resources as well.Michel Dänzer2013-01-211-2/+1
| | | | | | | No piglit regressions anymore thanks to fixes in libdrm_radeon and here. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Fix 1D tiling mode index for non-scanout resources.Michel Dänzer2013-01-211-1/+4
| | | | | Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* r600g/llvm: Fixes addressspace of basevectors for clipvertexVincent Lejeune2013-01-191-1/+2
|
* nv50/ir: add definitions of Target and CodeEmitter dtorsChristoph Bumiller2013-01-191-2/+2
| | | | I really did build test, my compiler just doesn't seem to care.
* nouveau: fix undefined behaviour when testing sample_countChristoph Bumiller2013-01-193-0/+6
| | | | NOTE: This is a candidate for the 9.0 branch.
* nv50/ir: fix a couple of warningsChristoph Bumiller2013-01-193-6/+11
|
* r600g/llvm: tgsi to llvm emits store.swizzle intrinsic for vs/fs outputVincent Lejeune2013-01-183-58/+146
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/llvm: tgsi to llvm emits stream output intrinsics.Vincent Lejeune2013-01-185-1/+39
| | | | Reviewed-by: Tom Stellard <[email protected]>