summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Fix stale binding table comment.Eric Anholt2014-07-021-2/+0
| | | | | | | I recently moved the code from the mentioned location right into this file. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Drop the memcmp for finding duplicated CURBE uploads.Eric Anholt2014-07-024-50/+2
| | | | | | | | | | | | | | At this point, the extra copy of the data and memcmp are as expensive as just re-uploading. Note: now that we'll always upload, and brw_constant_buffer watches BRW_NEW_BATCH anyway, we don't need to explicitly unref the old curbe_bo at batch reset time. No significant performance difference on glamor copywinwin10 (n=55), despite that test having a 98% hit rate on the cache. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Reuse intel_upload.c for gen4/5 constant buffers.Eric Anholt2014-07-023-31/+7
| | | | | | No performance difference on glamor with copywinwin10 (n=40) on my gm45. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* gallium: Add PIPE_SHADER_CAP_DOUBLESTom Stellard2014-07-026-1/+15
| | | | | | | This is for reporting whether or not double precision floating-point operations are supported. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Fix not setting build log if the build succeeds v2Matt Arsenault2014-07-025-13/+24
| | | | | | | | | If there were only warnings, they would not be added to the log. v2: - Use compat::string. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Have compat::string allocate its own memory.Francisco Jerez2014-07-022-5/+7
|
* gallium/radeon: Only print a message for LLVM diagnostic errorsTom Stellard2014-07-021-2/+4
| | | | | We were printing messages for all diagnostic types, which was spamming the console for some OpenCL programs.
* radeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQTom Stellard2014-07-021-1/+1
| | | | | | | | | Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Laurent Carlier <lordheavym@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=80015 CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
* r600g: allow viewport index/layer to be sent to psIlia Mirkin2014-07-021-2/+20
| | | | | | | | | | In order to support ARB_fragment_layer_viewport, we need to explicitly send these along to the pixel shader, since it has no other way to retrieve them. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Tobias Droste <tdroste@gmx.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* targets/dri: allow duplicated symbolsEmil Velikov2014-07-021-0/+6
| | | | | | | | | | | With the inclusion of xmlconfig in the loader we're providing dri* symbols which are already available in libdricommon.la. This leads to a build break due to the multiple definitions. Temporary allow multiple definitions, until we come with a better solution. Reported-by: Laurent Carlier <lordheavym@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/dri: Remove the old libdridrm libraryEmil Velikov2014-07-022-11/+4
| | | | | | | | | | With all the hw drivers converted, we can go back to having a single libdridrm provider. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-vmwgfx: Convert to static/shared pipe-driversEmil Velikov2014-07-028-128/+18
| | | | | | | | | | | | | | | Convert the final hardware driver to a single dri provider which includes all the pipe-drivers. Update the scons build and drop the unused vmw_powf.c. Cc: José Fonseca <jfonseca@vmware.com> Cc: Brian Paul <brianp@vmware.com> Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-ilo: Convert to static/shared pipe-driverEmil Velikov2014-07-024-102/+9
| | | | | | | | Cc: Chia-I Wu <olv@lunarg.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-i915: Convert to static/shared pipe-driversEmil Velikov2014-07-024-83/+9
| | | | | | | | | | | | | v2: - Drop inclusion of the winsys wrapper and softpipe/llvmpipe. - Remove old Makefile.am, target.c. - Correctly append i915 to the megadrivers list. Cc: Stephane Marchesin <stephane.marchesin@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-freedreno: Convert to static/shared pipe-driversEmil Velikov2014-07-025-105/+11
| | | | | | | | | | Now we don't need a second dri module when using kgsl :) Cc: Rob Clark <robclark@freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-driversEmil Velikov2014-07-0212-405/+33
| | | | | | | | | | | | | | | | Related to previous commit, merge the separate dri targets to a single one. This is essentially all the buildsystem mayhem required for megaradeon. Cc: Marek Olšák <marek.olsak@amd.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* targets/dri-nouveau: Convert to static/shared pipe-driversEmil Velikov2014-07-028-98/+109
| | | | | | | | | | | | | | | Similiar to other targets, we'd like to convert all the separate targets into a single one, thus we'll minimize the duplication and overall size of mesa. The conversion per API basis, with the drivers available either statically or shared. Currently the former is the default. v2: Correctly append the version script to the linker flags. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri/drm: Add a second libdridrm libraryEmil Velikov2014-07-021-1/+9
| | | | | | | | | | | Will be used to create the single dri target library, on our way to convert all the dri targets during the conversion to to static/shared pipe-drivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* st/dri: Allow separate dri-targetsEmil Velikov2014-07-027-2/+56
| | | | | | | | | | | With this commit we add a couple of DEFINES making the ST code conditional, in a way that we can use it to gradually convert the dri-targets from separate libraries into a single one. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* targets/dri-swrast: use drm aware dricommon when building more than swrastEmil Velikov2014-07-023-15/+4
| | | | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
* nvc0: add missed PIPE_CAP_DRAW_INDIRECTIlia Mirkin2014-07-011-0/+1
| | | | | | | Real support will be forthcoming. For now, avoid the unknown cap error and compiler warning. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* llvmpipe: get rid of llvmpipe_get_texture_tile_linearRoland Scheidegger2014-07-023-107/+17
| | | | | | | | | | | | | | Because the layout is always linear this didn't really do much any longer - at some point this triggered per-tile swizzled->linear conversion. The x/y coords were ignored too. Apart from triggering conversion, this also invoked alloc_image_data(), which could only actually trigger mapping of display target resources. So, instead just call resource_map in the callers (which also gives the ability to unmap again). Note that mapping/unmapping of display target resources still isn't really all that clean (map/unmap may be unmatched, and all such mappings use the same pointer thus usage flags are a lie). Reviewed-by: Brian Paul <brianp@vmware.com>
* llvmpipe: get rid of llvmpipe_get_texture_imageRoland Scheidegger2014-07-022-52/+1
| | | | | | | | The only caller left used it only for non display target textures, hence it was really the same as llvmpipe_get_texture_image_address - it also had a usage flag but this was ignored anyway. Reviewed-by: Brian Paul <brianp@vmware.com>
* llvmpipe: get rid of llvmpipe_get_texture_image_allRoland Scheidegger2014-07-024-65/+7
| | | | | | | | | | | Once used for invoking swizzled->linear conversion for all needed images. But we now have a single allocation for all images in a resource, thus looping through all slices is rather pointless, conversion doesn't happen neither. Also simplify the sampling setup code to use the mip_offsets array in the resource directly - if the (non display target) resource exists its memory will already be allocated as well. Reviewed-by: Brian Paul <brianp@vmware.com>
* llvmpipe: allocate regular texture memory upfrontRoland Scheidegger2014-07-021-0/+7
| | | | | | | | | | | The deferred allocation doesn't really make much sense anymore, since we no longer allocate swizzled/linear memory in chunks and not per level / slice neither. This means we could fail resource creation a bit more (could already fail in theory anyway) but should not fail maps later (right now, callers can't deal with neither really). Reviewed-by: Brian Paul <brianp@vmware.com>
* llvmpipe: get rid of linear_img structRoland Scheidegger2014-07-024-33/+19
| | | | | | | Just use a tex_data pointer directly - the description was no longer correct neither. Reviewed-by: Brian Paul <brianp@vmware.com>
* llvmpipe: (trivial) rename linear_mip_offsets to mip_offsetsRoland Scheidegger2014-07-024-6/+6
| | | | | | | Since switching to non-swizzled rendering we only have "normal", aka linear, offsets. Reviewed-by: Brian Paul <brianp@vmware.com>
* target-helpers: don't use designated initializersRoland Scheidegger2014-07-021-4/+4
| | | | | | | | | it looks since ce1a1372280d737a1b85279995529206586ae480 they are now included in more places, in particular even for things buildable with msvc, and hence those break the build. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* st/mesa: add support for indirect drawingChristoph Bumiller2014-07-023-1/+14
|
* gallium/u_vbuf: get draw info from an indirect buffer if there's anyMarek Olšák2014-07-021-44/+72
| | | | This is required for fallbacks to work with ARB_draw_indirect.
* gallium: add facilities for indirect drawingChristoph Bumiller2014-07-0218-0/+106
| | | | | | v2: Added comments to util_draw_indirect, clarified and fixed map size. Removed unlikely().
* gallium: add PIPE_BIND_COMMAND_ARGS_BUFFERChristoph Bumiller2014-07-022-0/+4
| | | | | Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS.
* xmlconfig/dri: bool -> unsigned charDave Airlie2014-07-023-10/+8
| | | | | | | | | Drop stdbool, due to the X server being a pain and having struct members called bool, although I've sent a patch to fix that we should retain stupidity here. Use unsigned char which is what GLboolean is anyways. Signed-off-by: Dave Airlie <airlied@redhat.com>
* i965/fs: Update discard jump to preserve uniform loads via sampler.Cody Northrop2014-07-011-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 17c7ead7 exposed a bug in how uniform loading happens in the presence of discard. It manifested itself in an application as randomly incorrect pixels on the borders of conditional areas. This is due to how discards jump to the end of the shader incorrectly for some channels. The current implementation checks each 2x2 subspan to preserve derivatives. When uniform loading via samplers was turned on, it uses a full execution mask, as stated in lower_uniform_pull_constant_loads(), and only populates four channels of the destination (see generate_uniform_pull_constant_load_gen7()). It happens incorrectly when the first subspan has been jumped over. The series that implemented this optimization was done before the changes to use samplers for uniform loads. Uniform sampler loads use special execution masks and only populate four channels, so we can't jump over those or corruption ensues. This fix only jumps to the end of the shader if all relevant channels are disabled, i.e. all 8 or 16, depending on dispatch. This preserves the original GLbenchmark 2.7 speedup noted in commit beafced2. It changes the shader assembly accordingly: before : (-f0.1.any4h) halt(8) 17 2 null { align1 WE_all 1Q }; after(8) : (-f0.1.any8h) halt(8) 17 2 null { align1 WE_all 1Q }; after(16): (-f0.1.any16h) halt(16) 17 2 null { align1 WE_all 1H }; v2: Cleaned up comments and conditional ordering. v3: Fix typo. Signed-off-by: Cody Northrop <cody@lunarg.com> Reviewed-by: Mike Stroyan <mike@lunarg.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79948
* i965/fs: Mark case unreachable to silence warning.Matt Turner2014-07-011-0/+2
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Use unreachable() instead of unconditional assert().Matt Turner2014-07-0155-324/+182
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Make unreachable macro take a string argument.Matt Turner2014-07-017-16/+17
| | | | | | To aid in debugging. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965/vec4: Remove useless conditionals.Matt Turner2014-07-011-6/+3
| | | | | Setting a couple of bits is the same cost or less as conditionally setting a couple of bits.
* i965/fs: Pass cfg to calculate_live_intervals().Matt Turner2014-07-016-12/+15
| | | | | | | We've often created the CFG immediately before, so use it when available. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Mark fields in the live interval classes protected.Matt Turner2014-07-012-16/+19
| | | | | | | | cfg, for instance, is a pointer to a local variable in calculate_live_intervals, certainly not valid after that function has returned. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Remove now unused foreach_list* macros.Matt Turner2014-07-011-24/+0
| | | | | | foreach_list_typed_const was never used as far as I can tell. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Use typed foreach_in_list_safe instead of foreach_list_safe.Matt Turner2014-07-0111-55/+20
| | | | Acked-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Use typed foreach_in_list instead of foreach_list.Matt Turner2014-07-0118-184/+76
| | | | Acked-by: Ian Romanick <ian.d.romanick@intel.com>
* i965: Add and use foreach_inst_in_block macros.Matt Turner2014-07-017-25/+17
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* i965/fs: Use is_head_sentinel() instead of ->prev == NULL.Matt Turner2014-07-011-1/+1
| | | | | | | Makes it more clear what we're doing and requires less knowledge of exec_list. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Add and use foreach_list_typed_safe.Matt Turner2014-07-012-3/+10
| | | | Acked-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Add and use foreach_in_list_use_after.Matt Turner2014-07-013-9/+7
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Replace uses of foreach_list_const.Matt Turner2014-07-012-17/+6
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Replace another couple uses of foreach_list.Matt Turner2014-07-011-6/+4
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Use foreach_list_typed when possible.Matt Turner2014-07-013-31/+18
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>