summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: fix blend color for RB swapped rendertargetsLucas Stach2017-06-214-14/+45
| | | | | | | | | Same as with the colormasks, the blend color needs to be swizzled according to the rendertarget format. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* nvc0: fix transfer of larger rectangles with DmaCopy on gk104 and upBen Skeggs2017-06-201-9/+32
| | | | | | | | | | | | | | | | By treating the rectangles as 1cpp, we can run up against some internal copy engine limits and trigger a MEM2MEM_RECT_OUT_OF_BOUNDS error check at launch time. This commit enables the REMAP hardware, which allows us to specify both the component size and number of components for a transfer. We're then able to pass in the real width/nblocksx values and not hit the limits. There's a couple of "supported" CPPs in the list that we can't actually hit, but are there simply because they're possible. Signed-off-by: Ben Skeggs <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* nvc0: copy engine surface params are only relevant for tiled surfacesBen Skeggs2017-06-201-18/+19
| | | | | | | | | Aside from reducing pushbuf usage in some situations, this commit should have no other effect, and is just to make it somewhat obvious that those methods have zero effect on linear surfaces. Signed-off-by: Ben Skeggs <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* swr: Include definition of missing functionGeorge Kyriazis2017-06-201-0/+1
| | | | | | | | | Inline function SWR_MULTISAMPLE_POS::PrecalcSampleData() was missing definition. Include definition in core/state_funcs.h. Fixes windows build. Reviewed-by: Tim Rowley <[email protected]>
* vc4: Clean up release build warnings using MAYBE_UNUSED.Eric Anholt2017-06-202-6/+5
| | | | | These variables are all used in an assert(), so release builds see no usages.
* vc4: Allow VBOs to be mapped during execution.Eric Anholt2017-06-201-1/+1
| | | | | | | | There's no reason we can't -- the mappings we expose are basically equivalent to persistent/coherent, already. Improves mesa-demos drawoverhead (no state change) performance by 5.21362% +/- 1.25078% (n=11).
* softpipe: remove unused softpipe_context::line_stipple_counterBrian Paul2017-06-201-2/+0
| | | | Trivial.
* radeonsi: set correct usage flag according to image access typeSamuel Pitoiset2017-06-201-1/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: update all resident texture descriptors when neededSamuel Pitoiset2017-06-201-57/+104
| | | | | | | | | | | | | | | To avoid useless DCC fetches when DCC is disabled, descriptors have to be updated in order to reflect this change. This is quite similar to how we update descriptors of bound textures. As a side effect, this should also prevent VM faults when bindless textures are invalidated, because the VA in the descriptor has to be updated accordingly as well. I don't see any performance improvements with DOW3. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: keep track of the sampler state for texture handlesSamuel Pitoiset2017-06-202-0/+2
| | | | | | | | Needed for updating all resident texture descriptors when dirty_tex_counter changes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix dumping shader descriptors into ddebug logsMarek Olšák2017-06-191-35/+41
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a workaround for inexact SNORM8 blitting againMarek Olšák2017-06-191-0/+37
| | | | | | | | GFX9 is affected. We only have tests for GL_x_SNORM where x is R8, RG8, RGB8, and RGBA8. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: fix TC-compatible stencil compressionMarek Olšák2017-06-191-0/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: fix TXF_LZ with 1D texturesMarek Olšák2017-06-191-1/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: disable sparse buffersMarek Olšák2017-06-191-0/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon/gfx9: fix PBO texture uploads to compressed texturesNicolai Hähnle2017-06-191-1/+6
| | | | | | | | | st/mesa creates a surface that reinterprets the compressed blocks as RGBA16UI or RGBA32UI. We have to adjust width0 & height0 accordingly to avoid out-of-bounds memory accesses by CB. Cc: 17.1 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600: fix off-by-one in egd_tables.pyNicolai Hähnle2017-06-191-1/+1
| | | | | | Port of the corresponding fix in sid_tables.py. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: reduce overhead for resident textures which need color decompressionSamuel Pitoiset2017-06-184-34/+58
| | | | | | | | | This is done by introducing a separate list. si_decompress_textures() is now 5x faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: reduce overhead for resident textures which need depth decompressionSamuel Pitoiset2017-06-184-8/+29
| | | | | | | This is done by introducing a separate list. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use util_dynarray_foreach for bindless resourcesSamuel Pitoiset2017-06-182-129/+46
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: add a new HUD query for the number of resident handlesSamuel Pitoiset2017-06-184-0/+12
| | | | | | | | | Useful for debugging performance issues when ARB_bindless_texture is enabled. This query doesn't make a distinction between texture and image handles. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600: include libelf headers only as neededEmil Velikov2017-06-171-0/+2
| | | | | | | | | | | | | | | | | Headers are required only when building with OpenCL. As we're building w/o it libelf may be missing, hence we'll error out as below: src/gallium/drivers/r600/evergreen_compute.c:27:10: fatal error: 'gelf.h' file not found ^ 1 error generated. Fixes: d96a210842 ("r600g,compute: provide local copy of functions from ac_binary.c") Reviewed-by: Jan Vesely <[email protected]> Reported-by: Mauro Rossi <[email protected]> Tested-by: Mauro Rossi <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* radeonsi: include ac_binary.h for struct ac_shader_binaryEmil Velikov2017-06-171-2/+2
| | | | | | | | | | | | | | The header embeds the struct so it needs the header inclusion instead of the dummy forward declaration. Cc: Nicolai Hähnle <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Tom Stellard <[email protected]> Fixes: 32206c5e560 ("radeonsi: Add radeon_shader_binary member to struct si_shader") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* r600, radeon: move radeon_shader_binary_{init,clean} back to radeonEmil Velikov2017-06-173-23/+28
| | | | | | | | | | | | | Those are used by r600 and radeonsi, so moving them within the former was a bad idea. Fixes: d96a210842b ("r600g,compute: provide local copy of functions from ac_binary.c") Cc: Jan Vesely <[email protected]> Cc: Aaron Watry <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* svga: add new num-failed-allocations HUD queryBrian Paul2017-06-165-2/+26
| | | | | | | This counter is incremented if we fail to allocate memory for vertex/index/const buffers, textures, etc. Reviewed-by: Neha Bhende <[email protected]>
* svga: add a few minor commentsBrian Paul2017-06-162-1/+6
| | | | Trivial.
* swr/rast: Fix read-back of viewport array indexTim Rowley2017-06-1610-117/+182
| | | | | | | Binner/clipper read viewport array index from the vertex header as needed. Move viewport state to BACKEND_STATE. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Refactor includes to limit simdintrin.h usageTim Rowley2017-06-1616-1079/+1147
| | | | | | | Reduces the files rebuilt after modifying simdintrin.h from 84 to 64. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Fix read-back of render target array indexTim Rowley2017-06-165-13/+18
| | | | | | | | The last FE stage can emit render target array index. Currently we only check to see if GS is emitting it. Moved the state to BACKEND_STATE and plumbed the driver to set it. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Adjust cast for gcc warningTim Rowley2017-06-161-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Don't transition hottile resolved->dirty during store tilesTim Rowley2017-06-161-1/+4
| | | | | | Fixes crash when dumping render targets and RT surface has been deleted. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: gen_llvm_types.py support for SIMD256/SIMD512Tim Rowley2017-06-161-6/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Properly size GS stage scratch spaceTim Rowley2017-06-161-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Fix early z / query interactionTim Rowley2017-06-161-0/+4
| | | | | | | | | | | | | | | | For certain cases, we perform early z for optimization. The GL_SAMPLES_PASSED query was providing erroneous results because we were counting the number of samples passed before the fragment shader, which did not work if the fragment shader contained a discard. Account properly for discard and early z, by anding the zpass mask with the post fragment shader active mask, after the fragment shader. Fixes the following piglit tests: - occlusion-query-discard - occlusion_query_meta_fragments Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Share vertex memory between VS input/outputTim Rowley2017-06-161-5/+2
| | | | | | | | Removes large simdvertex stack allocation. Vertex shader must ensure reads happen before writes. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add support for dynamic vertex size for VS outputTim Rowley2017-06-163-15/+23
| | | | | | | | Add support for dynamic vertex size for the vertex shader output. Add new state in SWR_FRONTEND_STATE to specify the size. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 FE - improve calcDeterminantIntVerticalTim Rowley2017-06-161-12/+20
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add support to PA for variable sized verticesTim Rowley2017-06-164-26/+38
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Rework attribute layoutTim Rowley2017-06-164-66/+103
| | | | | | | Move fixed attributes to the top and pack single component SGVs. WIP to support dynamically allocated vertex size. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Remove explicit primitive id slot in the vertex layoutTim Rowley2017-06-167-58/+33
| | | | | | | | - Remove any special casing in the PS stage when primitive ID is input. Treat as a normal attribute that must be set up properly in the FE linkage. - Remove primitive id from the PS_CONTEXT and TRI_FLAGS Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Fix invalid 16-bit format traits for A1R5G5B5Tim Rowley2017-06-161-100/+48
| | | | | | | Correctly handle formats of <= 16 bits where the component bits don't add up to the pixel size. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Implement JIT shader caching to diskTim Rowley2017-06-1610-18/+358
| | | | | | Disabled by default; currently doesn't cache shaders (fs,gs,vs). Reviewed-by: Bruce Cherniak <[email protected]>
* svga: add some missing SVGA_STATS_* enum values, prefix stringsBrian Paul2017-06-161-2/+15
| | | | | | | To fix the build when VMX86_STATS is defined. Also, some minor whitespace changes to match upstream code. Reviewed-by: Charmaine Lee <[email protected]>
* swr: Don't crash when encountering a VBO with stride = 0.Bruce Cherniak2017-06-161-7/+18
| | | | | | | | | | | | | | | | | | | | The swr driver uses vertex_buffer->stride to determine the number of elements in a VBO. A recent change to the state-tracker made it possible for VBO's with stride=0. This resulted in a divide by zero crash in the driver. The solution is to use the pre-calculated vertex element stream_pitch in this case. This patch fixes the crash in a number of piglit and VTK tests introduced by 17f776c27be266f2. There are several VTK tests that still crash and need proper handling of vertex_buffer_index. This will come in a follow-on patch. v2: Correctly update all parameters for VBO constants (stride = 0). Also fixes the remaining crashes/regressions that v1 did not address, without touching vertex_buffer_index. Reviewed-by: Tim Rowley <[email protected]>
* etnaviv: add rs-operations sw queryChristian Gmeiner2017-06-165-0/+8
| | | | | | | | It could be useful to get the number of emited resolve operations when doing driver optimizations. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: advertise correct max LOD biasLucas Stach2017-06-161-1/+3
| | | | | | | | | | | | The maximum LOD bias supported is the same as the max texture level supported. Fixes piglit: ext_texture_lod_bias Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: mask correct channel for RB swapped rendertargetsLucas Stach2017-06-163-13/+46
| | | | | | | | | | | | | Now that we support RB swapped targets by using a shader variant, we must derive the color mask from both the blend state and the bound framebuffer. Fixes piglit: fbo-colormask-formats Fixes: 7f62ffb68ad ("etnaviv: add support for rb swap") Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: replace translate_clear_color with util_pack_colorLucas Stach2017-06-162-48/+12
| | | | | | | | | | | | | | | This replaces the open coded etnaviv version of the color pack with the common util_pack_color. Fixes piglits: arb_color_buffer_float-clear fcc-front-buffer-distraction fbo-clearmipmap Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove bogus assertLucas Stach2017-06-161-2/+0
| | | | | | | | | | | etna_resource_copy_region handles resources with multiple samples by falling back to the software path. There is no need to kill the application there. Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: use padded width/height for resource copiesLucas Stach2017-06-161-2/+2
| | | | | | | | | | | | When copying a resource fully we can just blit the whole level. This allows to use the RS even for level sizes not aligned to the RS min alignment. This is especially useful, as etna_copy_resource is part of the software fallback paths (used in etna_transfer), that are used for doing unaligned copies. Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>