summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mesa,glsl,gallium: remove GLSLSkipStrictMaxVaryingLimitCheck and dependenciesMarek Olšák2013-07-0212-12/+0
| | | | | | Not needed with do_dead_builtin_varyings. Reviewed-by: Ian Romanick <[email protected]>
* draw/translate: fix instancingZack Rusin2013-06-284-16/+16
| | | | | | | | | | | | | | | | | | We were incorrectly computing the buffer offset when using the instances. The buffer offset is always equal to: start_instance * stride + (instance_num / instance_divisor) * stride We were completely ignoring the start instance quite often producing instances that completely wrong, e.g. if start instance = 5, instance divisor = 2, then on the first iteration it should be: 5 * stride, not (5/2) * stride as we'd have currently, and if start instance = 1, instance divisor = 3, then on the first iteration it should be: 1 * stride, not 0 as we'd have. This fixes it and adjusts all the code to the changes. Signed-off-by: Zack Rusin <[email protected]>
* nvc0: allow frame dropping in h264Maarten Lankhorst2013-07-011-3/+0
| | | | | | | | The only reason the checks existed were paranoia, when I first wrote the code I wasn't sure it was correct. Now that I am, the asserts triggered when XBMC was dropping frames, so remove it. NOTE: This is a candidate for the 9.1 branch.
* r300g/compiler: Prevent regalloc from swizzling texture operands v2Tom Stellard2013-06-305-0/+124
| | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=63520 NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r300g/compiler/tests: Add an assembly parserTom Stellard2013-06-305-16/+200
| | | | | | | The assembly parser can be used to load r300 assembly dumps and run them through any of the r300 compiler passes. Reviewed-by: Alex Deucher <[email protected]>
* r300g: Fix make checkTom Stellard2013-06-301-1/+2
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: implement fast color clears for MSAA on evergreen+Grigori Goronzy2013-07-013-2/+79
| | | | | | | | | | | | | | | | | | | | | | Allows MSAA colorbuffers, which have a CMASK automatically and don't need any further special handling, to be fast cleared. Instead of clearing the buffer, set the clear color and the CMASK to the cleared state. Fast clear is used only when all bound colorbuffers fulfill certain conditions: a CMASK is required, we have to be able to create a clear color value for the format and the texture mustn't contain multiple images. Technically, it should be possible to support array textures and cubemaps if all images are attached to the framebuffer, but this does not appear to be common. v2: fix fast clear check v3: Marek: - disable fast clear with 128-bit formats, which are unsupported - set tex->dirty_level_mask in r600_clear, so that the driver knows the resource must be decompressed/expanded - return early from r600_clear if there's nothing else to do Signed-off-by: Marek Olšák <[email protected]>
* r600g/compute: disable unused colorbuffer slotsMarek Olšák2013-07-011-1/+12
| | | | | Reviewed-by: Alex Deucher <[email protected]> Tested-by: Tom Stellard <[email protected]>
* llvmpipe: fix timer query if there's no binsRoland Scheidegger2013-06-291-0/+10
| | | | | | | | | | | | | b04a295a4a0cd2defe352b3193b5fa79ca8fc9fc removed seemingly unnecessary code in get_query. Turns out this code could in fact be reached - while timestamps are always binned, if there are no bins (which happens if fb size is 0) then the rasterization query code filling this in is still never executed. So fix this up by filling in some timestamp, but do it at EndQuery time not GetQuery time which should be more appropriate. Makes piglit arb_timer_query-timestamp-get happy again. Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi: disable 2D tiling on CIK for nowAlex Deucher2013-06-281-1/+4
| | | | | | Causes GPU hangs. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: add llvm processor names for CIKAlex Deucher2013-06-281-0/+3
| | | | | | Requires updated llvm. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: emit PA_SC_RASTER_CONFIG[_1] on cikAlex Deucher2013-06-281-17/+34
| | | | | | | | Use the golden values for each asic. Todo: update Kabini and Kaveri. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: PA_CL_ENHANCE is privileged on CIKAlex Deucher2013-06-281-2/+3
| | | | | | Needs to be and is set by the kernel. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: update surface sync packet emit for CIKAlex Deucher2013-06-281-6/+17
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: store chip class in the pm4 structAlex Deucher2013-06-285-19/+62
| | | | | | Will be used for asic specific pm4 behavior. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: properly handle DB tiling setup on CIKAlex Deucher2013-06-281-7/+155
| | | | | | | On CIK, DB switches back to using per-surface tiling parameters rather than the tile index used on SI. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: emit additional shader pgm rsrc registers for CIKAlex Deucher2013-06-281-0/+11
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: emit TA_BC_BASE_ADDR_HI for border color on CIKAlex Deucher2013-06-281-0/+2
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: fix VGT_PRIMITIVE_TYPE emit for CIKAlex Deucher2013-06-281-1/+4
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: register updates for CIKAlex Deucher2013-06-281-65/+931
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: initial PM4 changes for CIKAlex Deucher2013-06-282-8/+15
| | | | | | note which packets are removed and add new ones. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: initial support for CIK chipsAlex Deucher2013-06-281-1/+13
| | | | | | | Add the infrastructure to differentiate them. Just treat them like SI for now. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: rename SI chip class from TAHITI to SIAlex Deucher2013-06-281-2/+2
| | | | | | Covers the entire family. Signed-off-by: Alex Deucher <[email protected]>
* r600g: Fix buildTom Stellard2013-06-281-2/+2
| | | | | Broken since 2840bec56f79347b95dec5458b20d4a46d1aa445 when opencl is disabled.
* r600g/compute: Accept LDS size from the LLVM backendTom Stellard2013-06-285-20/+44
| | | | | | And allocate the correct amount before dispatching the kernel. Tested-by: Aaron Watry <[email protected]>
* r600g/compute: Move compute_shader_create() function into evergreen_compute.cTom Stellard2013-06-283-37/+23
| | | | Tested-by: Aaron Watry <[email protected]>
* svga: pass svga_compile_key by reference instead of valueBrian Paul2013-06-281-7/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: use switch statement in svga_shader_type()Brian Paul2013-06-281-5/+10
| | | | | | | Safer in case the PIPE_SHADER_x tokens get renumbered (as Marek wanted to do). Reviewed-by: Jose Fonseca <[email protected]>
* ilo: clean up states that use ilo_view_surfaceChia-I Wu2013-06-281-13/+10
| | | | Use variables that are easier to remember what they are.
* ilo: remove ilo_cbuf_state::countChia-I Wu2013-06-284-17/+12
| | | | We can derive it from enabled_mask.
* ilo: clean up ilo_set_constant_buffer()Chia-I Wu2013-06-281-29/+44
| | | | Add loops that will be optimized away.
* ilo: clean up states that take a start_slotChia-I Wu2013-06-281-73/+99
| | | | They are similar, so clean them up to make them look similar.
* ilo: use shorter names for dirty flagsChia-I Wu2013-06-287-141/+138
| | | | | The new names match those of ilo_context's members respectively, and are shorter.
* ilo: track if primitive restart has changedChia-I Wu2013-06-283-1/+8
| | | | Re-emit 3DSTATE_INDEX_BUFFER to enable/disable primitive restart.
* ilo: avoid potential dangling pointer dereferenceChia-I Wu2013-06-281-0/+3
| | | | Set pipe_draw_info to NULL after draw_vbo().
* llvmpipe: handle offset_clampRoland Scheidegger2013-06-273-2/+24
| | | | | | | | | | | | | | | This was just ignored (unless for some reason like unfilled polys draw was handling this). I'm not convinced of that code, putting the float for the clamp in the key isn't really a good idea. Then again the other floats for depth bias are already in there too anyway (should probably have a jit_context for the setup function), so this is just a quick fix. Also, the "minimum resolvable depth difference" used isn't really right as it should be calculated according to the z values of the current primitive and not be a constant (of course, this only makes a difference for float depth buffers), at least for d3d10, so depth biasing is still not quite right. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: remove never reached code for timestamp queries.Roland Scheidegger2013-06-271-2/+0
| | | | | timestamp queries are always binned in an active scene, therefore always have a result.
* llvmpipe: fix a bug in opaque optimizationRoland Scheidegger2013-06-273-14/+20
| | | | | | | | | If there are queries active the opaque optimization reseting the bin needs to be disabled. (Not really tested since the bug was discovered by code inspection not an actual test failure.) Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi/compute: Fix memory leak in radeonsi_launch_grid.Vinson Lee2013-06-271-0/+1
| | | | | | Fixes "Resource leak" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]>
* ilo: plug a potential index buffer leakChia-I Wu2013-06-271-0/+1
| | | | | This is harmless since st_context and u_vbuf both set index buffer to NULL before destroying themselves. But we do not want to rely on that behavior.
* softpipe: honor predication for clear_render_target and clear_depth_stencilRoland Scheidegger2013-06-261-2/+40
| | | | | | trivial, copied from llvmpipe Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: add support for nested / overlapping queriesRoland Scheidegger2013-06-2610-40/+45
| | | | | | | | | | | | | | | | OpenGL doesn't support this but d3d10 does. It is a bit of a pain as it is necessary to keep track of queries still active at the end of a scene, which is also why I cheat a bit and limit the amount of simultaneously active queries to (arbitrary) 16 (simplifies things because don't have to deal with a real list that way). I can't think of a reason why you'd really want large numbers of overlapping/nested queries so it is hopefully fine. (This only affects queries which need to be binned.) v2: don't copy remainder of array when deleting an entry simply replace the deleted entry with the last one (order doesn't matter). Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: rework query logicRoland Scheidegger2013-06-267-81/+92
| | | | | | | | | | | | | | | | | | | | | | | | Previously lp_rast_begin_query commands were always inserted into each bin, and re-issued if the scene was restarted, while lp_rast_end_query commands were executed for each still active query at the end of tile rasterization. Also, the ps_invocations and vis_counter were set to zero when the respective command was encountered. This however cannot work for multiple queries of the same type (note that occlusion counter and occlusion predicate while different type were also affected). So, change the logic to always set the ps_invocations and vis_counter to zero at the start of tile rasterization, and then use "start" and "end" per-thread query values when encountering the begin/end query commands instead, which should work for multiple queries of the same type. This also means queries do not have to be reissued in a new scene, however they still need to be finished at end of tile rasterization, so a list of queries still active at the end of a scene needs to be maintained. Also while here don't bin the queries which don't do anything in rasterization. (This change does not actually handle multiple queries of the same type yet, as the list of active queries is just a simple fixed array and setup can still only have one query active per type.) Reviewed-by: Jose Fonseca <[email protected]>
* nvc0: set rsvd_kick correctlyMaarten Lankhorst2013-06-261-0/+1
| | | | | | | | | This prevents trampling beyond the end of the command stream during flushes. NOTE: This is a candidate for the stable branches. Reported-by: Christoph Bumiller <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* nvc0: fix push_space checks for video decodingMaarten Lankhorst2013-06-264-9/+10
|
* ilo: Remove max_threads dead code path.Vinson Lee2013-06-261-3/+0
| | | | | | | | | max_threads cannot be greater than 28. It is either 21 or 28. Fixes "Logically dead code" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* ilo: use a bitmask for enabled constant buffersChia-I Wu2013-06-262-11/+14
| | | | | Looping over 4 * 13 constant buffers while in most cases only two are enabled is stupid.
* ilo: support PIPE_CAP_USER_INDEX_BUFFERSChia-I Wu2013-06-269-36/+97
| | | | | | | | We want to access the user buffer, if available, when primitive restart is enabled and the restart index/primitive type is not natively supported. And since we are handling index buffer uploads in the driver with this change, we can also work around misalignment of index buffer offsets.
* ilo: make pipe_draw_info a context stateChia-I Wu2013-06-269-39/+33
| | | | | | Rename ilo_finalize_states() to ilo_finalize_3d_states(), and bind pipe_draw_info to the context when it is called. This saves us from having to pass pipe_draw_info around in several places.
* ilo: support PIPE_CAP_USER_CONSTANT_BUFFERSChia-I Wu2013-06-265-23/+88
| | | | We need it for HUD support, and will need it for push constants in the future.