summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600
AgeCommit message (Collapse)AuthorFilesLines
2014-08-21r600g: Fix flat/smooth shade state toggle10.3-branchpointGlenn Kennard1-1/+3
If only the flat/smooth shade state changed between two render calls the prior code would miss updating the hardware state. Also add check for sprite coord, potentially same type of issue otherwise for it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81967 Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-21r600g/compute: Don't initialize vertex_buffer_state masks to 0x2Tom Stellard1-3/+0
cs_vertex_buffer_state.enabled_mask and cs_vertex_buffer_state.dirty_mask are both updated when r600_set_constant_buffer() is called, so we don't need to manually update these values. This fixes a crash with OpenCL programs that have a kernel with no arguments. https://bugs.freedesktop.org/show_bug.cgi?id=82671 CC: "10.2" <mesa-stable@lists.freedesktop.org>
2014-08-21r600g/compute: Use the first parameter in evergreen_set_global_binding()Tom Stellard1-2/+3
2014-08-19r600g: Fix missing SET_TEXTURE_OFFSETSGlenn Kennard4-57/+87
SB needs a bit of special handling to handle instructions without obvious side effects, to avoid it deleting them. Fixes failing non-const ARB_gpu_shader5 textureOffsets piglits with sb enabled. Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-19gallium: Add and handle PIPE_CAP_CONDITIONAL_RENDER_INVERTEDTobias Klausmann1-0/+1
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
2014-08-19r600g: copy IA_MULTI_VGT_PARAM programming from radeonsi for CaymanMarek Olšák4-3/+36
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-08-19radeonsi: use r600_draw_rectangle from r600gMarek Olšák4-70/+0
Rectangles are easier than triangles for the rasterizer. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-08-15gallium/r300/r600/radeonsi: handle query_renderer capsEmil Velikov1-0/+11
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-08-15r600g: Implement ARB_derivative_controlGlenn Kennard2-10/+12
Requires Evergreen/Cayman marek: update release notes Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-14gallium: add opcodes/cap for fine derivative supportIlia Mirkin1-0/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Reviewed-by: Roland Scheidegger <sroland@vmware.com> (v1) v2: Reuse opcode gaps as suggested by Marek
2014-08-15r600g: Implement BPTC texture supportGlenn Kennard1-0/+24
Requires Evergreen/Cayman Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-08-14r600g: implement invalidation of texture buffer objectsMarek Olšák3-5/+44
This fixes piglit spec/ARB_texture_buffer_object/data-sync. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-14r600g: fix constant buffer fetchesMarek Olšák1-0/+1
Somebody forgot to do this. It was uncovered by recent st/mesa changes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82139 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2014-08-14r600g: clear constant buffer sizes at the beginning of CSMarek Olšák3-87/+49
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-13radeon/compute: Report a value for PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZETom Stellard1-1/+10
CC: "10.2" <mesa-stable@lists.freedesktop.org>
2014-08-13android: gallium/radeon: attempt to fix the android buildPaulo Sergio Travaglia1-1/+1
- include the correct folders - add a new buildscript for the common radeon folder v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> [Emil Velikov] Split up and add commit message. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-08-12radeon/uvd: fix gpu_address for video surfacesChristian König1-0/+2
We need to get the new gpu_address as well when reallocating the cs buffer. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82428 Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
2014-08-11gallium: remove PIPE_SHADER_CAP_MAX_ADDRSMarek Olšák1-3/+0
This limit is fixed in Mesa core and cannot be changed. It only affects ARB_vertex_program and ARB_fragment_program. The minimum value for ARB_vertex_program is 1 according to the spec. The maximum value for ARB_vertex_program is limited to 1 by Mesa core. The value should be zero for ARB_fragment_program, because it doesn't support ARL. Finally, drivers shouldn't mess with these values arbitrarily. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-09r600g/compute: fix compile warningsMarek Olšák2-10/+11
Trivial.
2014-08-09r600g: use gpu_address from r600_resourceMarek Olšák5-39/+29
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-09r600g: remove useless r600_resource_va callsMarek Olšák1-18/+9
R600-R700 don't support virtual memory. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-01r600g: Implement gpu_shader5 textureGatherGlenn Kennard2-5/+36
Adds 0-3 textureGather component selection and non-constant offsets Caveat: 0 and 1 texture swizzles only work if textureGather component select is 3 or a component that does not exist in the sampler texture format. This is a hardware limitation, any other value returns 128/255=0.501961 for both 0 and 1. Passes all textureGather piglit tests on radeon 6670, except for those using 0/1 texture swizzles due to aforementioned reason. Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-07-31r600g: gpu_shader5 gl_SampleMaskIn supportGlenn Kennard2-7/+40
Map TGSI_SEMANTIC_SAMPLEMASK to register/component. Enable face register when sample mask is needed by shader. Requires Evergreen/Cayman Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-31r600g: Implement gpu_shader5 integer opsGlenn Kennard1-0/+190
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-31r600g: Add IMUL_HI/UMUL_HI supportGlenn Kennard1-6/+6
Fixes fs-imulExtended, fs-imulExtended-only-msb, fs-umulExtended, fs-umulExtended-only-msb piglit tests. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-31r600g: Implement GL_ARB_texture_query_lodGlenn Kennard2-2/+13
Requires Evergreen or later v2 (Andreas): Update relnotes/10.3 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
2014-07-29gallium/radeon: Add some Emacs .dir-locals.el filesMichel Dänzer1-0/+11
Based on the toplevel one but adapted to the driver/winsys coding styles. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-07-28r600g,radeonsi: switch all occurences of array_size to util_max_layerMarek Olšák1-2/+3
This fixes 3D texture support in all these cases, because array_size is 1 with 3D textures and depth0 actually contains the "array size". util_max_layer is universal and returns the last layer index for any texture target. A lot of the cases below can't actually be hit with 3D textures, but let's be consistent. This fixes a failure in: piglit layered-rendering/clear-color-all-types 3d single_level for r600g and radeonsi, which was caused by an incorrect CMASK size calculation. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-07-28gallium: rename shader cap MAX_CONSTS to MAX_CONST_BUFFER_SIZEMarek Olšák2-2/+2
This new name isn't so confusing. I also changed the gallivm limit, because it looked wrong. Reviewed-by: Brian Paul <brianp@vmware.com> v2: use sizeof(float[4])
2014-07-28r600g: switch SNORM conversion to DX and GLES behaviorMarek Olšák4-7/+0
it also matches GL 4.2 further discussion: http://lists.freedesktop.org/archives/mesa-dev/2013-August/042680.html Cc: mesa-stable@lists.freedesktop.org
2014-07-28r600g/compute: Add debug information to promote and demote functionsBruno Jiménez1-4/+11
v2: Add information about the item's starting point and size v3: Rebased on top of master Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-28r600g/compute: Add documentation to compute_memory_poolBruno Jiménez2-31/+86
v2: Rebased on top of master Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-25r600g/compute: Defrag the pool at the same time as we grow itBruno Jiménez2-23/+19
This allows us two things: we now need less item copies when we have to defrag+grow the pool (to just one copy per item) and, even in the case where we don't need to defrag the pool, we reduce the data copied to just the useful data that the items use. Note: The fallback path is a bit ugly now, but hopefully we won't need it much. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-25r600g/compute: Try to use a temporary resource when growing the poolBruno Jiménez1-18/+43
Now, before moving everything to host memory, we try to create a new resource to use as a pool. I we succeed we just use this resource and delete the previous one. If we fail we fallback to using the shadow. This should make growing the pool faster, and we can also save 64KB of memory that were allocated for the 'shadow', even if they weren't used. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-25r600g/compute: Fix singed/unsigned comparison compiler warnings.Jan Vesely1-7/+7
The iteration variables go from 0 anyway. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-25r600g/compute: Allow compute_memory_defrag to defragment between resourcesBruno Jiménez2-5/+7
This will be used in the following patch to avoid duplicated code Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-25r600g/compute: Allow compute_memory_move_item to move items between resourcesBruno Jiménez2-16/+16
v2: Remove unnecesary variables Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-23Revert "r600g/compute: Fix warnings"Tom Stellard2-16/+12
This reverts commit 467f1585e28adba0e94ef593de131bc327f098bb. This breaks the build on some systems.
2014-07-23r600g/compute: Fix warningsTom Stellard2-12/+16
2014-07-23r600g: Use hardware sqrt instructionGlenn Kennard2-7/+4
Piglit quick tests including sqrt pass, no other regressions, tested on radeon 6670. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-23r600g/compute: Remove unneeded code from compute_memory_promote_itemBruno Jiménez2-36/+12
Now that we know that the pool is defragmented, we positively know that allocated + unallocated will be the total size of the current pool plus all the items that will be promoted. So we only need to grow the pool once. This will allow us to just add the new items to the end of the item_list without the need of looking for a place to the new item. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-23r600g/compute: Quick exit if there's nothing to add to the poolBruno Jiménez1-0/+4
This way we can avoid defragmenting the pool, even if it is needed to defragment it, and looping again through the list of unallocated items. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-23r600g/compute: Defrag the pool if it's necesaryBruno Jiménez2-17/+19
This patch adds a new member to the pool to track its status. For now it is used only for the 'fragmented' status, but if needed it could be used for more statuses. The pool will be considered fragmented if: An item that isn't the last is freed or demoted. This 'strategy' has a problem, although it shouldn't cause any bug. If for example we have two items, A and B. We choose to free A first, now the pool will have the 'fragmented' status. If we now free B, the pool will retain its 'fragmented' status even if it isn't fragmented. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-23r600g/compute: Add a function for defragmenting the poolBruno Jiménez2-0/+28
This new function will move items forward in the pool, so that there's no gap between them, effectively defragmenting the pool. For now this function is a bit dumb as it just moves items forward without trying to see if other items in the pool could fit in the gaps. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-23r600g/compute: Add a function for moving items in the poolBruno Jiménez2-0/+93
This function will be used in the future by compute_memory_defrag to move items forward in the pool. It does so by first checking for overlaping ranges, if the ranges don't overlap it will copy the contents directly. If they overlap it will try first to make a temporary buffer, if this buffer fails to allocate, it will finally fall back to a mapping. Note that it will only be needed to move items forward, it only checks for overlapping ranges in that case. If needed, it can easily be added by changing the first if. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-07-21radeonsi/compute: Share COMPUTE_DBG macro with r600gTom Stellard1-13/+0
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-07-18r600g: Implement GL_ARB_texture_gatherGlenn Kennard2-7/+42
Only supported on evergreen and later. Currently limited to single component textures as the hardware GATHER4 instruction ignores texture swizzles. Piglit quick run passes on radeon 6670 with all applicable textureGather tests, no regressions. Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-07-09r600g: remove unused base_vector_chan variableIlia Mirkin1-1/+0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-07-09gallium: switch dedicated centroid field to interpolation locationIlia Mirkin1-2/+2
The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-07-03gallium: rename PIPE_CAP_TGSI_VS_LAYER to also have _VIEWPORTIlia Mirkin1-1/+1
Now that this cap is used to determine the availability of both, adjust its name to reflect the new reality. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>