summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallivm,draw,llvmpipe: mass rename of unit->texture_unit/sampler_unitRoland Scheidegger2013-01-287-95/+95
| | | | | | | | | | | 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-2820-357/+709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* gallium/u_upload_mgr: fix a serious memory leakMarek Olšák2013-01-281-2/+1
| | | | It can eat all memory and crash in a matter of minutes with r600g.
* 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.
* util: add new error checking code in vbuf helperBrian Paul2013-01-251-27/+49
| | | | | | | | | | | Check the return value of calls to u_upload_alloc() and u_upload_data() and return early if needed. Since we don't have a way to propagate errors all the way up to Mesa through pipe_context::draw_vbo(), call debug_warn_once() so the user might have some clue about OOM errors. Note: This is a candidate for the 9.0 branch.
* util: add some defensive coding in u_upload_alloc()Brian Paul2013-01-251-1/+7
| | | | | | | | | | | | | | Some callers of this function were checking the 'ptr' result to see if the function failed. But the correct way is to check the regular return value for PIPE_ERROR_x. Now we initialize all the returned values at the top of the function in case we do hit an error (like OOM). Callers are more likely to detect OOM conditions now. But there are some callers which don't do any error checking... Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: add casts to silence MSVC warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned comparison warningsBrian Paul2013-01-251-4/+4
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC double->float conversion warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned warnings in debug_get_flags_option()Brian Paul2013-01-251-1/+1
| | | | 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]>
* libgl-xlib/build: Link with C++ when LLVM is usedMatt Turner2013-01-241-1/+9
| | | | | | Also link-in libX11 and libXext. Tested-by: Brian Paul <[email protected]>
* st/dri: disallow recursion in dri_flushMarek Olšák2013-01-242-1/+13
| | | | | | | | | | | ST_FLUSH_FRONT may call driThrottle, which is implemented with dri_flush. This prevents double flush as well as fence leaks caused by a recursion in the middle of throttling. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58839 Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* st/dri: add null-pointer check, remove duplicated local variableMarek Olšák2013-01-241-4/+5
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* Revert "Revert "targets/opencl: Link against libgallium.la instead of ↵Tom Stellard2013-01-242-9/+1
| | | | | | | | | libgallium.a"" This reverts commit 7824ab807050c03c6df01c44774914dcbef88248. Now that we force linking with LLVM shared libs when building clover, we can link against libgallium.la with no problems.
* 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]>
* draw: fix MSVC divide-by-zero compilation errorBrian Paul2013-01-221-1/+2
| | | | Kind of lame, but it works.
* draw: fix problem in screen-space interpolation clip codeBrian Paul2013-01-221-3/+3
| | | | | | | | | | | | | | | | | | I don't see how this could have ever worked right. The screen-space interpolation code uses the vertex->data[pos_attr] position which contain window coords. But window coords are only computed for the unclipped vertices; the clipped vertices have undefined window coords (see draw_cliptest_tmp.h). Use the vertex clip coords instead which are always defined. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=55476 (piglit fbo-blit-stretch failure on softpipe) Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <[email protected]>
* draw: improve the clipper debug/printf codeBrian Paul2013-01-221-1/+20
| | | | Reviewed-by: José Fonseca <[email protected]>
* draw: add new debug code and comments in clip code templateBrian Paul2013-01-221-0/+15
| | | | | | | | In debug builds, set clipped vertex window coordinates to NaN values to help debugging. Otherwise, we're just leaving the coordinate in clip space and it's invalid to use it later expecting it to be a window coord. Reviewed-by: José Fonseca <[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]>
* vl: round next_msc to integer frame, and kill skew_mscMaarten Lankhorst2013-01-211-5/+2
| | | | | | | | This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly when falling behind. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Christian König <[email protected]>
* scons: Fix dependencies of generated headers.José Fonseca2013-01-212-6/+4
| | | | | | | | | | | | | | It appears that scons implicit dependency scanners fail to chain dependencies of generated headers when these are outside the build tree. This patch ensures generated source files are _always_ put in the build tree. I'm not 100% this will fix all depency issues, but from my experiments it does seem to fix this. NOTE: For this to be effective it is necessary to clean the source tree from generated header/source files. Reviewed-by: Brian Paul <[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]>
* build: Remove dead SHARED_GLAPI variableMatt Turner2013-01-201-1/+0
| | | | | | | The static Makefiles used it. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* gallium: Remove ppc asm backendAdam Jackson2013-01-207-3077/+0
| | | | | | | | | | | | | | | | | | | | | The vs part hasn't been wired up since tgsi_sse2 was disabled in: commit 4eb3225b38ce12cb34ab3d90804c9683bd7b4ed3 Author: José Fonseca <[email protected]> Date: Tue Nov 8 00:10:47 2011 +0000 Remove tgsi_sse2. And it would certainly not work correctly in its current state: draw/draw_vs_ppc.c: In function ‘draw_create_vs_ppc’: draw/draw_vs_ppc.c:190:24: warning: assignment from incompatible pointer type [enabled by default] As with the sse2 backend, this should be done in llvm anyway. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Adam Jackson <[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]>