summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/ir3: sync instr/disasmRob Clark2018-12-074-25/+132
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: don't fetch unused tex componentsRob Clark2018-12-072-0/+29
| | | | | | | Detect when a component of an (for example) texture fetch is unused and propagate the updated wrmask back to the parent instruction. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: blitter fixesRob Clark2018-12-072-3/+80
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2018-12-077-35/+56
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/drm: fix relocs in nested stateobjsRob Clark2018-12-071-3/+15
| | | | | | | | If we have an reloc from stateobjA to stateobjB, we would previously leave stateobjB's bos out of the submit's bos table. Handle this case by copying into stateobjA's reloc_bos table. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx+a6xx: remove unused fs/vs pvt memRob Clark2018-12-074-20/+0
| | | | | | copy/pasta from older gens Signed-off-by: Rob Clark <[email protected]>
* gallium: fix typoRob Clark2018-12-071-1/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: remove unused fd_surface fieldsRob Clark2018-12-071-5/+0
| | | | Signed-off-by: Rob Clark <[email protected]>
* nir: Fixup algebraic test for variable-sized conversionsConnor Abbott2018-12-071-1/+1
| | | | | | | | | | b2i can now take any size boolean in preparation for 1-bit booleans, so the error message printed is slightly different. Fixes: dca6cd9ce65 ("nir: Make boolean conversions sized just like the others") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108961 Cc: Jason Ekstrand <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* gallium: add missing PIPE_CAP_SURFACE_SAMPLE_COUNT default valueSamuel Pitoiset2018-12-071-0/+3
| | | | | | Fixes: 2710c40e3c8 ("gallium: Add new PIPE_CAP_SURFACE_SAMPLE_COUNT") Signed-off-by: Samuel Pitoiset <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* freedreno: Add support for EXT_multisampled_render_to_textureKristian H. Kristensen2018-12-063-1/+7
| | | | | | | | | There is not much to do in freedreno - tile layout and multisample state for gmem renderings is programmed based on the pfb sample count, while resolve blits take the destination sample count from the resource. Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: MSAARob Clark2018-12-0610-24/+74
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* st/mesa: Add support for EXT_multisampled_render_to_textureKristian H. Kristensen2018-12-063-0/+5
| | | | | | | | | In gallium, we model the attachment sample count as a new nr_samples field in pipe_surface. A driver can indicate support for the extension using the new pipe cap, PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* gallium: Add new PIPE_CAP_SURFACE_SAMPLE_COUNTKristian H. Kristensen2018-12-064-2/+19
| | | | | | | | | | | This new pipe cap and the new nr_samples field in pipe_surface lets a state tracker bind a render target with a different sample count than the resource. This allows for implementing EXT_multisampled_render_to_texture and EXT_multisampled_render_to_texture2. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* mesa: Add core support for EXT_multisampled_render_to_texture{,2}Kristian H. Kristensen2018-12-0610-16/+96
| | | | | | | | | This also turns on EXT_multisampled_render_to_texture which is a subset of EXT_multisampled_render_to_texture2, allowing only COLOR_ATTACHMENT0. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* nir/algebraic: Make algebraic_parser_test.sh executable.Vinson Lee2018-12-061-0/+0
| | | | | | | | | | Fixes make check permission error. ../../bin/test-driver: line 107: ./nir/tests/algebraic_parser_test.sh: Permission denied FAIL nir/tests/algebraic_parser_test.sh (exit status: 126) Fixes: a0ae12ca91a4 ("nir/algebraic: Add unit tests for bitsize validation") Signed-off-by: Vinson Lee <[email protected]>
* amd: remove support for LLVM 6.0Samuel Pitoiset2018-12-0621-520/+85
| | | | | | | User are encouraged to switch to LLVM 7.0 released in September 2018. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Android build fixesKristian H. Kristensen2018-12-052-1/+2
| | | | | | | A couple of simple fixes for building on Android with autotools. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nir: Make boolean conversions sized just like the othersJason Ekstrand2018-12-0520-74/+121
| | | | | | | | | Instead of a single i2b and b2i, we now have i2b32 and b2iN where N is one if 8, 16, 32, or 64. This leads to having a few more opcodes but now everything is consistent and booleans aren't a weird special case anymore. Reviewed-by: Connor Abbott <[email protected]>
* nir/opt_algebraic: Add 32-bit specifiers to a bunch of booleansJason Ekstrand2018-12-051-56/+56
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/opt_algebraic: Drop bit-size suffixes from conversionsJason Ekstrand2018-12-051-29/+29
| | | | | | | | Suffixes are dropped from a bunch of conversion opcodes when it makes sense to do so. Others are kept if we really do want the bit-size restriction. Reviewed-by: Connor Abbott <[email protected]>
* nir/opt_algebraic: Simplify an optimization using the new search opsJason Ekstrand2018-12-051-7/+2
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: Add support for unsized conversion opcodesJason Ekstrand2018-12-053-10/+140
| | | | | | | | | | | | All conversion opcodes require a destination size but this makes constructing certain algebraic expressions rather cumbersome. This commit adds support to nir_search and nir_algebraic for writing conversion opcodes without a size. These meta-opcodes match any conversion of that type regardless of destination size and the size gets inferred from the sizes of the things being matched or from other opcodes in the expression. Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: Refactor codegen a bitJason Ekstrand2018-12-051-10/+11
| | | | | | | Instead of using an OrderedDict, just have a (necessarily sorted) array of transforms and a set of opcodes. Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: Clean up some __str__ cruftJason Ekstrand2018-12-051-4/+0
| | | | | | | Both of these things are already handled in the Value base class so we don't need to handle them explicitly in Constant. Reviewed-by: Connor Abbott <[email protected]>
* nir/opcodes: Rename tbool to tbool32Jason Ekstrand2018-12-051-11/+11
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/opcodes: Pull in the type helpers from constant_expressionsJason Ekstrand2018-12-053-35/+35
| | | | | | | While we're at it, we rework them a bit to all use regular expressions and assert more. Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: Add unit tests for bitsize validationConnor Abbott2018-12-054-1/+129
| | | | | | | | | The non-failure path can be tested by just compiling mesa and then testing it, but the failure paths won't be hit unless you make a mistake, so it's best to test them with some unit tests. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* nir/algebraic: Rewrite bit-size inferenceConnor Abbott2018-12-053-366/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, there were two copies of the algorithm: one in C, that we would use to figure out what bit-size to give the replacement expression, and one in Python, that emulated the C one and tried to prove that the C algorithm would never fail to correctly assign bit-sizes. That seemed pretty fragile, and likely to fall over if we make any changes. Furthermore, the C code was really just recomputing more-or-less the same thing as the Python code every time. Instead, we can just store the results of the Python algorithm in the C datastructure, and consult it to compute the bitsize of each value, moving the "brains" entirely into Python. Since the Python algorithm no longer has to match C, it's also a lot easier to change it to something more closely approximating an actual type-inference algorithm. The algorithm used is based on Hindley-Milner, although deliberately weakened a little. It's a few more lines than the old one, judging by the diffstat, but I think it's easier to verify that it's correct while being as general as possible. We could split this up into two changes, first making the C code use the results of the Python code and then rewriting the Python algorithm, but since the old algorithm never tracked which variable each equivalence class, it would mean we'd have to add some non-trivial code which would then get thrown away. I think it's better to see the final state all at once, although I could also try splitting it up. v2: - Replace instances of "== None" and "!= None" with "is None" and "is not None". - Rename first_src to first_unsized_src - Only merge the destination with the first unsized source, since the sources have already been merged. - Add a comment explaining what nir_search_value::bit_size now means. v3: - Fix one last instance to use "is not" instead of != - Don't try to be so clever when choosing which error message to print based on whether we're in the search or replace expression. - Fix trailing whitespace. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* radv: expose VK_EXT_scalar_block_layoutSamuel Pitoiset2018-12-052-0/+7
| | | | | | | | | | | | Nothing to do, the compiler already handles that. All new dEQP.VK.ubo.* and dEQP.VK.ssbo.* pass, except some 16-bit tests that are quite related to fdo bug #108114. Only enable the extension on CIK+ because it might not work on SI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* spirv: add SpvCapabilityInt64AtomicsSamuel Pitoiset2018-12-052-1/+5
| | | | | | | Required for VK_KHR_shader_atomic_int64. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* drisw: Use separate drisw_loader_funcs for shmMichal Srb2018-12-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The original code was modifying the global drisw_lf variable, which is bad when there are multiple contexts in single process, each initialized with different loader. One may support put_image_shm and the other not. Since there are currently only two possible combinations, lets create two global tables, one for each. Lets make them const, since we won't change them and they can be shared. This fixes crash in VLC. It used two GL contexts (each in different thread), one was initialized by its Qt GUI, the other by its video output plugin. The first one set the put_image_shm=drisw_put_image_shm, the second did not, but since the same structure was used, the drisw_put_image_shm was used too. Then it crashed because the second loader did not have putImageShm set. Downstream bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1113533 v2: Added Fixes and described the VLC bug. Fixes: 63c427fa71a ("drisw: use putImageShm if available") Signed-off-by: Michal Srb <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Constify drisw_loader_funcs structMichal Srb2018-12-054-5/+5
| | | | | | | | The content is not expected to change. Cc: [email protected] Signed-off-by: Michal Srb <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: wait on the high 32 bits of timestamp queriesSamuel Pitoiset2018-12-051-1/+4
| | | | | | | | In case we are unlucky if the low part is 0xffffffff. Fixes: 5d6a560a29 ("radv: do not use the availability bit for timestamp queries") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reset pending_reset_query when flushing cachesSamuel Pitoiset2018-12-052-1/+5
| | | | | | | | | | | | | If the driver used a compute shader for resetting a query pool, it should be completed when caches are flushed. This might reduce the number of stalls if operations are done between vkCmdResetQueryPool() and vkCmdBeginQuery() (or vkCmdWriteTimestamp()). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Alex Smith <[email protected]>
* anv/query: flush render target before copying resultsLionel Landwerlin2018-12-055-0/+32
| | | | | | | | | | | | | | | This change tracks render target writes in the pipeline and applies a render target flush before copying the query results to make sure the preceding operations have landed in memory before the command streamer initiates the copy. v2: Simplify logic in CopyQueryResults (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108909 Fixes: 37f9788e9a8e44 ("anv: flush pipeline before query result copies") Cc: [email protected]
* radv: Flush before vkCmdWriteTimestamp() if neededAlex Smith2018-12-051-11/+19
| | | | | | | | | | | As done for vkCmdBeginQuery() already. Prevents timestamps from being overwritten by previous vkCmdResetQueryPool() calls if the shader path was used to do the reset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108925 Fixes: a41e2e9cf5 ("radv: allow to use a compute shader for resetting the query pool") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: rework the TC-compat HTILE hardware bug with COND_EXECSamuel Pitoiset2018-12-053-28/+81
| | | | | | | | | | | | | | | | | | | | After investigating on this, it appears that COND_WRITE doesn't work correctly in some situations. I don't know exactly why does it fail to update DB_Z_INFO.ZRANGE_PRECISION, but as AMDVLK also uses COND_EXEC I think there is a reason. Now the driver stores a new metadata value in order to reflect the last fast depth clear state. If a TC-compat HTILE is fast cleared with 0.0f, we have to update ZRANGE_PRECISION to 0 in order to work around that hardware bug. This fixes rendering issues with The Forest and DXVK and doesn't seem to introduce any regressions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108914 Fixes: 68dead112e7 ("radv: update the ZRANGE_PRECISION value for the TC-compat bug") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* st/mesa: expose EXT_render_snorm on GLESMarek Olšák2018-12-041-0/+8
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: expose AMD_texture_texture4Marek Olšák2018-12-044-0/+14
| | | | | | because the closed driver exposes it. Tested by piglit. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: expose EXT_texture_compression_bptc in GLESMarek Olšák2018-12-043-1/+21
| | | | | | | | | tested by piglit. v2: rebase Reviewed-by: Ilia Mirkin <[email protected]> (v1) Reviewed-by: Erik Faye-Lund <[email protected]>
* mesa: expose EXT_texture_compression_rgtc on GLESMarek Olšák2018-12-043-6/+24
| | | | | | | | | The spec was modified to support GLES. Tested by piglit. v2: rebase Reviewed-by: Ilia Mirkin <[email protected]> (v1) Reviewed-by: Erik Faye-Lund <[email protected]>
* mesa/main: fix up _mesa_has_rg_textures for gles2Erik Faye-Lund2018-12-041-1/+2
| | | | | | | | | | | rg-textures are supported in GLES 2.0 if EXT_texture_rg, so let's make sure the enums are accepted. Fixes: 510b6424607 "mesa/main: do not allow rg-textures enums before gles3" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108936 Signed-off-by: Erik Faye-Lund <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: correct validation for GL_RGB565Erik Faye-Lund2018-12-041-1/+3
| | | | | | | | | | | Technically speaking, this validation was incorrect, because GL_RGB565 is only supported in OpenGL ES 1.x if OES_framebuffer_object is supported. This couldn't lead to any real incorrect behavior, because all drivers support OES_framebuffer_object. But let's keep the code self-documenting, by correcting the check as per the spec. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: expose GL_EXT_texture_view as an alias of GL_OES_texture_viewMarek Olšák2018-12-042-0/+14
| | | | | | There are no spec changes. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: expose GL_OES_texture_viewMarek Olšák2018-12-041-0/+1
| | | | | | | | | | For format fallbacks like ETC and ASTC, switching between sRGB and linear decoding is undefined, or at least is not bit-exact. Same as EXT_texture_sRGB_decode on GLES. There are no piglit or dEQP regresssions. Reviewed-by: Ilia Mirkin <[email protected]>
* loader: deduplicate logger function declarationEric Engestrom2018-12-042-3/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: drop unused & deprecated libEric Engestrom2018-12-041-1/+1
| | | | | | | | DeprecationWarning: the imp module is deprecated in favour of importlib Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* anv: add unreachable() for VK_EXT_fragment_density_mapEric Engestrom2018-12-041-0/+3
| | | | | | | This silences the -Wswitch compiler warning. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/tools: make sure the binary file is properly readAndrii Simiklit2018-12-041-3/+13
| | | | | | | | | | | | | | | | | | | | | | | 1. tools/i965_disasm.c:58:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result fread(assembly, *end, 1, fp); v2: Fixed incorrect return value check. ( Eric Engestrom <[email protected]> ) v3: Zero size file check placed before fread with exit() ( Eric Engestrom <[email protected]> ) v4: - Title is changed. - The 'size' variable was moved to top of a function scope. - The assertion was replaced by the proper error handling. - The error message on a caller side was fixed. ( Eric Engestrom <[email protected]> ) Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>