summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium/u_queue: use a ring instead of a stackMarek Olšák2016-06-244-20/+47
| | | | | | | | and allow specifying its size in util_queue_init. v2: use CALLOC & FREE Reviewed-by: Nicolai Hähnle <[email protected]>
* Remove wrongly repeated words in commentsGiuseppe Bilotta2016-06-2318-22/+22
| | | | | | | | | | | | | | | | | Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* svga: update some comments in svga_buffer_handle()Brian Paul2016-06-231-10/+3
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: add a const qualifier in svga_buffer_upload_piecewise()Brian Paul2016-06-231-1/+1
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: minor code refactor for svga_buffer_upload_command()Brian Paul2016-06-231-5/+21
| | | | | | Put the HBS code into a separate function. Reviewed-by: Charmaine Lee <[email protected]>
* svga: minor code simplification in svga_context_finish()Brian Paul2016-06-231-1/+1
| | | | | | Signed-off-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* swr: [rasterizer core] fix dependency bugTim Rowley2016-06-234-10/+10
| | | | | | | Never be dependent on "draw 0", instead have a bool that makes the draw dependent on the previous draw or not dependent at all. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] use wrap-around safe compares for dependency checkingTim Rowley2016-06-236-36/+45
| | | | | | Move drawIDs from 64-bit to 32-bit to increase perf. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer jitter] add support for component packing for 'odd' formatsTim Rowley2016-06-231-4/+23
| | | | | | Add early-out if no components are enabled. Add asserts. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] track whether GS outputs viewport array indexTim Rowley2016-06-231-0/+3
| | | | | | So we can skip the index gather in PA. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] GS viewport array index attributeTim Rowley2016-06-232-1/+2
| | | | | | Only adds the attribute mapping to the jitter; no implementation yet. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] conservative rasterization frontend supportTim Rowley2016-06-2310-63/+325
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] stop single threaded crash exit crashTim Rowley2016-06-231-2/+3
| | | | | | | Function static destructors were getting called by exit handlers before context teardown. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer jitter] small fetch jit cleanupTim Rowley2016-06-231-134/+36
| | | | | | | | Handle SGV stores separate from the stream fetch code. Because of this change, there is a potential to jit an extra unused store. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] remove old commentTim Rowley2016-06-231-1/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer jitter] cleanup supporting different llvm versionsTim Rowley2016-06-238-34/+73
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer jitter] unitialized component fix in fetch jitTim Rowley2016-06-231-1/+1
| | | | | | | Was trying to store an extra uninitialized component. Only affects component packing, which isn't enabled (yet). Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer] add support for building avx512 versionTim Rowley2016-06-235-15/+20
| | | | | | | Currently, most code paths between AVX2 and AVX512 are identical (see changes to knobs.h). Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer common] fix include for Intel compilerTim Rowley2016-06-231-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer common] workaround clang for windows __cpuid() bugTim Rowley2016-06-231-5/+9
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: push/pop DEBUG macro around llvm includesTim Rowley2016-06-232-4/+13
| | | | | | | | | | llvm redefines DEBUG; adding push/pop prevents a undefined reference to debug_refcnt_state in llvm-3.7+. v2: add undef DEBUG Cc: "12.0" <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* svga: rename svga_surface_copy() to svga_resource_copy_region()Brian Paul2016-06-231-9/+9
| | | | | | To be consistent with the pipe_context function name. Reviewed-by: Charmaine Lee <[email protected]>
* svga: don't copy blit_info into local varBrian Paul2016-06-231-11/+10
| | | | | | There's no reason for doing so. Reviewed-by: Charmaine Lee <[email protected]>
* gallium/util: fix some 4-space indentation in blitter codeBrian Paul2016-06-231-21/+21
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix texture array update regressionCharmaine Lee2016-06-231-6/+27
| | | | | | | | | | | | | | | With commit fb9fe35, we start using transfer_inline_write for memcpy TexSubImage path, but that triggers a regression with texture array in the svga driver. With this patch, the direct map code will update the texture array correctly. Fixes VMware bug 1679293. Tested with MTT piglit, glretrace, conform. Reviewed-by: Brian Paul <[email protected]>
* svga: fix index/vertex buffer surface reference at drawCharmaine Lee2016-06-231-0/+20
| | | | | | | | | | | | | | | | | | Currently with the SetVertexBuffers optimization, we avoid emitting redundant DXSetVertexBuffers commands. However, these buffers surfaces will still need to be referenced, otherwise, in the case of linux, the subsequent surface discard map will map to the existing mob instead of a new one, causing rendering artifacts. With this patch, we'll call resource_rebind() to reference the resources even if we are avoiding the actual set command. This fixes the rendering artifacts in the window title area running with unity in Ubuntu 14.04 Tested with piglit, glretrace. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* svga: fix vertex buffer references in the hw stateCharmaine Lee2016-06-234-27/+64
| | | | | | | | | | | | | | This patch fixes three issues with vertex buffer references: (1) Instead of copy the vertex buffer resource handles to the hw state in the context structure, use pipe_resource_reference to properly reference the vertex buffer resources in the context. (2) Make sure to unbind those unused vertex buffer resources. (3) Force to rebind the vertex buffer resources at the first draw of each command buffer to make sure the vertex buffer resources are paged in. Reviewed-by: Brian Paul <[email protected]>
* svga: fix index buffer reference in the hw stateCharmaine Lee2016-06-233-6/+16
| | | | | | | | Instead of copy the index buffer resource handle to the hw state in the context structure, use pipe_resource_reference to properly reference the index buffer resource in the context. Reviewed-by: Brian Paul <[email protected]>
* nv50,nvc0: fix start_instance in manual push pathIlia Mirkin2016-06-212-10/+22
| | | | | | | | | | The start instance is applied as an offset into the buffer directly, ignoring the divisor, not as an instance id offset that respects the divisor. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* translate: fix start_instance parameter in sse versionIlia Mirkin2016-06-211-7/+7
| | | | | | | | | The generic version gets this right already, but this was using an incorrect formula in SSE. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: add a debug flag for unsafe math LLVM optimizationsMarek Olšák2016-06-213-0/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use u_blitter for mipmap generationMarek Olšák2016-06-212-1/+32
| | | | | | | | This reduces time spend in glGenerateMipmap by a half. v2: don't decompress the levels to be overwritten Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: implement mipmap generationMarek Olšák2016-06-212-114/+238
| | | | | | | | | for pipe_context::generate_mipmap first move some of the blit code from util_blitter_blit_generic to a separate function, then use it from util_blitter_generate_mipmap Reviewed-by: Nicolai Hähnle <[email protected]>
* clover: Fix build against clang SVN >= r273191Vedran Miletić2016-06-211-1/+1
| | | | | | setLangDefaults() now requires PreprocessorOptions as an argument. Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* gallium: make image_view constRob Clark2016-06-207-10/+10
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: make constant_buffer constRob Clark2016-06-2021-24/+23
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: make shader_buffers constRob Clark2016-06-206-9/+9
| | | | | | | Be consistent with the rest of the "set_xyz" state interfaces. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use trapezoid distribution for tess on Fiji and PolarisNicolai Hähnle2016-06-202-8/+24
| | | | | | | This yields a small performance improvement in Unigine Heaven. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/sid: add Fiji+ tesselation distribution modeNicolai Hähnle2016-06-201-3/+7
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: emit PA_SC_RASTER_CONFIG_1 only onceNicolai Hähnle2016-06-201-16/+17
| | | | | | | It is the same for all SEs. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix calculation of valid RB mask per SENicolai Hähnle2016-06-201-4/+9
| | | | | | | | The old calculation treated too many RBs as disabled. Cc: 11.0 11.1 11.2 12.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: raise SI_PM4_MAX_DWNicolai Hähnle2016-06-201-1/+1
| | | | | | | | | The old limit, introduced in commit afa752d3f03ac6697581ff5d324e8ac0512ef513, was exceeded by 4 SE configurations which hit si_write_harvested_raster_configs. Cc: 11.1 11.2 12.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: don't use integer min/max sse intrinsics with llvm >= 3.9Roland Scheidegger2016-06-201-2/+4
| | | | | | | | | | | | | | | | | | | Apparently, these are deprecated. There's some AutoUpgrade feature which is supposed to promote these to cmp/select, which apparently doesn't work with jit code. It is possible it's not actually even meant to work (see the bug filed against llvm which couldn't provide an answer neither) but in any case this is meant to be only temporary unless the intrinsics are really illegal. So, just use the fallback code (which should be cmp/select, we're actually doing cmp/sext/trunc/select, but in any case llvm 3.9 manages to optimize this back to pmin/pmax in the end). This addresses https://llvm.org/bugs/show_bug.cgi?id=28176 CC: <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Vinson Lee <[email protected]> Tested-by: Aaron Watry <[email protected]>
* nvc0: don't make use of push hint if there are no non-const user vbosIlia Mirkin2016-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | This makes the check match up what we do on nv50 as well - there's no point in switching over the push path if everything's in managed buffers. This can happen when a shader uses a vertex without an enabled array - we end up passing it a constant attribute. This also has the effect of "fixing" some flickering in Talos. I have no idea why. I've stared at the push logic forwards, backwards, and sideways. By always forcing the push path (which is slow), the flickering also goes away, but other rendering is still wrong (specifically draw 383068 as identified in the bug). However by not switching over to the push path, draw 383068 is correct. Note that other flickering remains in Talos, like the red/green walls/floors. This takes care of the shadow flickering though. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90513 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gk104/ir: fix tex use generation to be more careful about eliding usesIlia Mirkin2016-06-192-12/+27
| | | | | | | | | | | | | If we have a loop, instructions before the tex might be added as tex uses, and those may in fact dominate all other uses of the tex results. This however doesn't mean that we don't need a texbar after the tex. Only check if uses dominate each other they are dominated by the tex. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96565 Fixes: 7752bbc44 (gk104/ir: simplify and fool-proof texbar algorithm) Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* nv50: add support for GL_EXT_window_rectanglesIlia Mirkin2016-06-187-5/+74
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: add support for GL_EXT_window_rectanglesIlia Mirkin2016-06-187-5/+72
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: add PIPE_CAP_MAX_WINDOW_RECTANGLES to all driversIlia Mirkin2016-06-1817-0/+18
| | | | | | | | This says how many window rectangles are supported by the implementation, although it may not exceed PIPE_MAX_WINDOW_RECTANGLES. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: add API for setting window rectanglesIlia Mirkin2016-06-183-3/+25
| | | | | | | | | | | | | | | | | | Window rectangles apply to all framebuffer operations, either in inclusive or exclusive mode. They may also be specified as part of a blit operation. In exclusive mode, any fragment inside any of the specified rectangles will be discarded. In inclusive mode, any fragment outside every rectangle will be discarded. The no-op state is to have 0 rectangles in exclusive mode. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* nv50/ir: add missing strings for some recent sysvalsSamuel Pitoiset2016-06-181-0/+3
| | | | | | | | | This is pretty useful for debugging purposes and those should not be omitted. Fixes: 517a93b3 ("nvc0: add ARB_shader_draw_parameters support") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>