summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* winsys/radeon: implement buffer_unmapMarek Olšák2015-07-232-6/+24
| | | | | | | This has been a no-op due to performance concerns. From now on, drivers should decide when they don't want to unmap, not the winsys. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: remove buffer_unmap calls that can potentially decrease perfMarek Olšák2015-07-237-26/+1
| | | | | | | | | | | | | buffer_unmap is currently a no-op on radeon and done correctly on amdgpu. I plan to fix it for radeon, but before that, all occurences of buffer_unmap that can negatively affect performance in the future must be removed. There are 2 reasons for removing buffer_unmap calls: - There is a likelihood that buffer_map will be called again, so we don't want to unmap yet. - The buffer is being released, which automatically unmaps it. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove switch statement in si_create_contextMarek Olšák2015-07-233-13/+7
| | | | | | and make si_init_config static Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't change pipe_resource in resource_copy_regionMarek Olšák2015-07-234-160/+110
| | | | | | | Copied from r600g. pipe_resource can be shared by multiple threads, so we shouldn't change it. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: upload shader rodata after updating scratch relocationsMarek Olšák2015-07-233-29/+29
| | | | | | Cc: 10.5 10.6 <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove redundant parameter in si_shader_binary_readMarek Olšák2015-07-233-8/+5
| | | | | Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* cso: eliminate some sampler function wrappersMarek Olšák2015-07-232-33/+12
|
* gallium/tests: use cso_set_samplersMarek Olšák2015-07-231-2/+3
|
* gallium/util: use cso_set_samplersMarek Olšák2015-07-233-13/+20
|
* cso: remove clip state handlingMarek Olšák2015-07-232-57/+0
| | | | | | There is no need for this. v2: handle redundant clip state changes in st/mesa
* cso: only allow saving and restoring fragment sampler statesMarek Olšák2015-07-225-20/+24
|
* cso: drop inefficient checking for redundant sampler state changesMarek Olšák2015-07-221-26/+2
| | | | | Drivers can do this better, because they can skip redundant state changes at per-slot granularity.
* cso: only allow saving and restoring fragment sampler viewsMarek Olšák2015-07-225-60/+59
| | | | Not needed for other shader stages.
* gallium/util: improve dump functionsMarek Olšák2015-07-223-53/+241
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: allow dumping to a file directlyMarek Olšák2015-07-223-8/+23
|
* st/dri: enable 3D textures and sRGB colorspace for EGLAnatoli Antonovitch2015-07-221-0/+14
| | | | | Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/dri: expose sRGB visuals (v2)Marek Olšák2015-07-222-5/+25
| | | | | | | v2: The fix for the darkness in Ubuntu Unity is in the hunk with the 4-line comment. Reviewed-by: Emil Velikov <[email protected]>
* scons: don't build the kms-dri winsysEmil Velikov2015-07-224-30/+0
| | | | | | | | | Same as previous commit - unused (gbm is not a thing outside the autotools build). v2: Remove trailing HAVE_LIBDRM. Signed-off-by: Emil Velikov <[email protected]>
* android: don't build the kms-dri winsysEmil Velikov2015-07-224-40/+2
| | | | | | | | | | GBM (the only user of kms-dri) is currently not available under Android. Considering we have no way of testing/using this let's not bother building it for now. Cc: Chih-Wei Huang <[email protected]> Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* android: dri: correctly set HAVE_LIBDRMEmil Velikov2015-07-221-5/+3
| | | | | | | | Set the macro if we're not building swrast alone. Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]>
* st/dri: unwrap/remove __NOT_HAVE_DRM_H magicEmil Velikov2015-07-224-23/+1
| | | | | | | | | | | | | | | With the dri_interface.h clean of the macro, we can remove the final only st/dri specific use of the very same. Seemingly it was incorrectly used, as the build-time presence of dri2 is not libdrm specific. At run-time, the code is already limited to dri2 use-cases plus returning true, when the extension is not present (or too old) will likely lead to a crash as one tries to use it shortly after the dri_with_format() call. As a side effect this gives us a nice cleanup the builds. Signed-off-by: Emil Velikov <[email protected]>
* radeonsi: Flush when we're asked to return a fence but don't have one yetMichel Dänzer2015-07-221-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-21394-1521/+1514
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* nvc0: force cache flush when binding a new uboSamuel Pitoiset2015-07-211-0/+2
| | | | | | | | This fixes the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: force cache flush when binding a new uboSamuel Pitoiset2015-07-211-0/+2
| | | | | | | | This fixes the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* r600/sb: Fix an &/&& mistakeAdam Jackson2015-07-211-1/+1
| | | | | | | | | | | | | | | gcc says: sb/sb_sched.cpp: In member function 'bool r600_sb::alu_group_tracker::try_reserve(r600_sb::alu_node*)': sb/sb_sched.cpp:492:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] if (!trans & fbs) It happens to be harmless; if fbs is ever non-zero, it will be VEC_210, which is 5, so (!trans & 5) == 1 and the branch works as expected. But logical AND is clearly what was meant. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* nouveau: use bool instead of booleanSamuel Pitoiset2015-07-2170-679/+679
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* gallivm: Initialize LLVM Modules's DataLayout to an empty string.Tom Stellard2015-07-201-5/+23
| | | | | | | | | | | | | | This fixes crashes in llvmpipe with LLVM 3.8 and also some piglit tests on radeonsi that use the draw module. This is just a temporary solution. The correct solution will require creating a TargetMachine during gallivm initialization and pulling the DataLayout from there. This will be a somewhat invasive change, and it will need to be validatated on multiple LLVM versions. https://llvm.org/bugs/show_bug.cgi?id=24172 Reviewed-by: Roland Scheidegger <[email protected]>
* nvc0: add a missing parameter to nvc0_set_shader_images()Samuel Pitoiset2015-07-201-3/+3
| | | | | | | | | | | This fixes a compilation warning introduced in commit 05a12c5 (gallium: add interface for writable shader images). While we are at it, fix indentation and rename parameters according to the gallium interface. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nouveau: always align buffers to 0x100Samuel Pitoiset2015-07-201-7/+1
| | | | | | | | | | | | | | Only constbufs must be aligned to 0x100, but since all buffers can be rebinded as constant buffers they must be also aligned. This patch prevents this behaviour by aligning everything to 256-byte increments at buffer creation. This fixes dmesg fails for the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer -auto -fbo Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: limit the maximum number of samplers to 16Samuel Pitoiset2015-07-201-1/+1
| | | | | | | | | | | | | | NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't want to do anything with NV50_3D_BIND_TSC2, just limit the maximum number of samplers to 16 like for nvc0. This fixes dmesg fails with the following piglit test: max-samplers But the test still fails. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: turn samples counts off during blitSamuel Pitoiset2015-07-201-0/+11
| | | | | | | | Fixes the following piglit test: occlusion_query_meta_no_fragments Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: add nesting support for occlusion queriesSamuel Pitoiset2015-07-202-11/+20
| | | | | | | This is loosely based on nvc0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: fix max level clamping on G80Ilia Mirkin2015-07-201-2/+9
| | | | | | | | | It appears that the G80 did not have support for the sampler view first/last clamping. Put the view's last level in the place of the texture's so that it doesn't go past what the sampler view allows. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* gm107/ir: fix indirect txq emissionIlia Mirkin2015-07-181-2/+8
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0/ir: don't worry about sampler in txq handlingIlia Mirkin2015-07-181-22/+8
| | | | | | | | | There's no need to deal with samplers for texture size queries. That code also was accidentally setting an invalid sIndirectSrc position, but it can now just be removed. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0/ir: fix txq on indirect samplersIlia Mirkin2015-07-182-2/+56
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* vc4: Switch to using a separate ioctl for making shaders.Eric Anholt2015-07-174-12/+78
| | | | | | | | | This gives the kernel a chance to validate and lock down the data, without having to deal with mmap zapping. With this, GLBenchmark stops on a texture relocations, because we'd recycled a shader BO as another shader and failed to revalidate, since we weren't clearing the cached validation state on mmap faults.
* vc4: Fix printing of shader-db debug when shader-db isn't turned on.Eric Anholt2015-07-171-4/+6
|
* vc4: Add debugging on texture relocation validation failures.Eric Anholt2015-07-171-7/+13
|
* vc4: Also consider uniform 0 in uniform lowering.Eric Anholt2015-07-171-3/+3
| | | | The hash table considers key 0 to be the empty key.
* vc4: Use the pure/const attributes on a bunch of our QPU functions.Eric Anholt2015-07-172-18/+18
| | | | | | On a release build, this makes the rest of vc4_qpu_validate.c go away (the compiler didn't know that our qpu helper function calls had no side effects).
* gallium: add interface for writable shader buffersMarek Olšák2015-07-162-0/+28
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add interface for writable shader imagesMarek Olšák2015-07-1610-27/+120
| | | | | | PIPE_CAPs will be added some other time. Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add new limits for shader buffers and imagesMarek Olšák2015-07-163-4/+5
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add BIND flags for R/W buffers and imagesMarek Olšák2015-07-167-13/+19
| | | | | | | | | | | | | | | | | PIPE_CAPs and TGSI support will be added later. The TGSI support should be straightforward. We only need to split TGSI_FILE_RESOURCE into TGSI_FILE_IMAGE and TGSI_FILE_BUFFER, though duplicating all opcodes shouldn't be necessary. The idea is: * ARB_shader_image_load_store should use set_shader_images. * ARB_shader_storage_buffer_object should use set_shader_buffers(slots 0..M-1) if M shader storage buffers are supported. * ARB_shader_atomic_counters should use set_shader_buffers(slots M..N) if N-M+1 atomic counter buffers are supported. PIPE_CAPs can describe various constraints for early DX11 hardware. Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: add PIPE_CAP_MAX_SHADER_PATCH_VARYINGSMarek Olšák2015-07-1615-0/+18
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* clover: little OpenCL status code logging cleanEdB2015-07-165-25/+32
| | | | | | | | s/build_error/compile_error in order to match the stored OpenCL status code. Make program::build catch and log every OpenCL error. Make tgsi error triggering uniform with the llvm one. Reviewed-by: Francisco Jerez <[email protected]>
* osmesa: fix OSMesaPixelsStore typoBrian Paul2015-07-151-1/+1
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91337 Cc: 10.6 <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vc4: Cache the texture p1 for the sampler.Eric Anholt2015-07-143-49/+69
| | | | | Cuts another 12% of vc4_uniforms.o, in exchange for computing it at CSO creation time.