summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: remove \n being only printed in debug builds after printed TGSIMarek Olšák2019-11-111-12/+4
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: rename DEBUG_TGSI -> DEBUG_PRINT_IRMarek Olšák2019-11-114-7/+7
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: fix Sanctuary and Tropics by disabling ARB_gpu_shader5 for themMarek Olšák2019-11-111-1/+1
| | | | | | | They use the "sample" keyword as a variable name. Cc: 19.2 19.3 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: check framebuffer completeness only after state updateLionel Landwerlin2019-11-111-6/+6
| | | | | | | | | | | | The change made in 88d665830f27 ("mesa: check draw buffer completeness on glClearBufferfi/glClearBufferiv") correctly updated the state prior to checking the framebuffer completeness on glClearBufferiv but not in glClearBufferfi. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Fixes: 88d665830f27 ("mesa: check draw buffer completeness on glClearBufferfi/glClearBufferiv") Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/2072
* Meson: Remove lib prefix from graw and osmesa when building with Mingw.Prodea Alexandru-Liviu2019-11-071-0/+2
| | | | | | | | | | | Also remove version sufix from osmesa swrast on Windows. v2: Make sure we don't remove lib prefix on *nix platforms. Signed-off-by: Prodea Alexandru-Liviu <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: "19.3" <[email protected]>
* mesa: expose SPIR-V extensions in the Compatibility profile tooMarek Olšák2019-11-071-2/+2
| | | | | | | | | We would like to have GL 4.6 Compatibility too. The extensions don't support compatibility features, so no other changes are needed. Reviewed-by: Alejandro Piñeiro <[email protected]>
* st_get_external_sampler_key: improve error messageDrew DeVault2019-11-071-1/+2
| | | | Signed-off-by: Marek Olšák <[email protected]>
* mesa/st: Make st_pipe_format_to_mesa_format an effective no-op.Eric Anholt2019-11-072-588/+3
| | | | | | | | | | All callers other than the unit test just wanted to convert back from a known-mesa-equivalent format, which is now a no-op. v2: Fix assertion failure in iris GL startup with BGR565 by continuing to return MESA_FORMAT_NONE for non-Mesa formats. Reviewed-by: Marek Olšák <[email protected]> (v1)
* mesa/st: Gut most of st_mesa_format_to_pipe_format().Eric Anholt2019-11-071-629/+40
| | | | | | | | | Now that MESA_FORMAT_x is just a PIPE_FORMAT_x define, we can strip this function down to just the compression fallbacks. v2: Restore the SRGB format for ASTC SRGB fallback case. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Redefine MESA_FORMAT_* in terms of PIPE_FORMAT_*.Eric Anholt2019-11-071-329/+271
| | | | | | | | | | | | | | | | | There are various places in Mesa where we would like to be able to have a shared format enum between Mesa and gallium (NIR compiler's image formats, for example, or mapping from gallium's formats to mesa's and vice versa in st_format.c). Rewriting all MESA_FORMAT to PIPE_FORMAT would be disruptive and possibly more work than it's worth (And I actually prefer MESA_FORMAT's name scheme), so for now just make it so that there's one shared set of enum values. The #defines here were generated by printing out from the tests/st_format.c round-tripping loop, with the exception of 8888 formats where I hand-edited the #defines to point at the corresponding gallium packed format define. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Prepare for the MESA_FORMAT_* enum to be sparse.Eric Anholt2019-11-076-4/+29
| | | | | | | | | To redefine MESA_FORMAT in terms of PIPE_FORMAT enums, we need to fix places where we iterated up to MESA_FORMAT_COUNT. I use _mesa_get_format_name(f) == NULL as the signal that it's not an enum value with a MESA_FORMAT. Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Test round-tripping of all compressed formats.Eric Anholt2019-11-071-2/+4
| | | | | | | | | We checked round-tripping of formats without fallbacks, but weren't setting the compression support flags in the mock context and thus needed to skip testing those. Just set all the flags and assert that no fallbacks are triggered, so we get full test coverage. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Stop defining a full separate format for RGBA_UINT8.Eric Anholt2019-11-076-12/+11
| | | | | | | | | We have packed formats for RGBA and ABGR already, so we can just pack/unpack code. v2: Rebase on endianness macro rename Reviewed-by: Marek Olšák <[email protected]> (v1)
* gallium: Add equivalents of packed MESA_FORMAT_*UINT formats.Eric Anholt2019-11-071-0/+69
| | | | | | | | These are the last formats that MESA_FORMAT had and PIPE_FORMAT didn't. The .csv entries channel sizes and swizzles all came from the corresponding UNORM format. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add an equivalent of MESA_FORMAT_BGR_UNORM8.Eric Anholt2019-11-071-0/+4
| | | | | | | | This is the last unorm format that MESA_FORMAT had and PIPE_FORMAT didn't. Note that it's an array format on gallium's side as well, since it's a NPOT pixel size. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add some more channel orderings of packed formats.Eric Anholt2019-11-071-0/+32
| | | | | | This covers everything that MESA_FORMAT had for packed unorm. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add defines for FXT1 texture compression.Eric Anholt2019-11-071-0/+10
| | | | | | | | | | This texture compression is exposed by 830 and 915, and to make MESA_FORMAT match PIPE_FORMAT defines I need a corresponding PIPE_FORMAT. v2: Set is_hand_written so we don't try to generate pack/unpack code. Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Add mapping of MESA_FORMAT_RGB_SNORM16 to gallium.Eric Anholt2019-11-071-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/imports: let the build system detect strtok_r()Eric Engestrom2019-11-051-1/+1
| | | | | | | | Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2013 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Tested-by: Prodea Alexandru-Liviu <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* mesa: fix call to _mesa_lookup_vao_errPierre-Eric Pelloux-Prayer2019-11-051-1/+1
| | | | | | Fixes: 3e842a0b0ea ("mesa: rework _mesa_lookup_vao_err to allow usage from EXT_dsa") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2055 Reviewed-by: Kenneth Graunke <[email protected]>
* util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIANDylan Baker2019-11-0515-28/+28
| | | | | | | | | | | As requested by Tim. This was generated with: grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g v2: - add this patch Reviewed-by: Eric Engestrom <[email protected]>
* mesa/main: delete now unused _mesa_little_endianDylan Baker2019-11-051-12/+0
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* mesa/swrast: replace instances of _mesa_little_endian with preprocessorDylan Baker2019-11-052-6/+5
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* mesa/main: replace uses of _mesa_little_endian with preprocessorDylan Baker2019-11-056-21/+49
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* util/u_endian: set PIPE_ARCH_*_ENDIAN to 1Dylan Baker2019-11-057-14/+14
| | | | | | | | | | | | This will allow it to be used as a drop in replacement for _mesa_little_endian in a number of cases. v2: - Always define PIPE_ARCH_LITTLE_ENDIAN and PIPE_ARCH_BIG_ENDIAN, define the one that reflects the host system to 1 and the other to 0 - replace all uses of #ifdef, #ifndef, and #if defined() with #if and #if ! with PIPE_ARCH_*_ENDIAN Reviewed-by: Eric Engestrom <[email protected]>
* dri/osmesa: use preprocessor for selecting endian code pathsDylan Baker2019-11-051-6/+9
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* r100: Use preprocessor to select big vs little endian pathsDylan Baker2019-11-053-46/+51
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* r200: use preprocessor for big vs little endian checksDylan Baker2019-11-052-45/+38
| | | | | | | Instead of using a function at runtime we can just build the right code for the right platform. Reviewed-by: Eric Engestrom <[email protected]>
* mesa: add EXT_dsa glGetVertexArray* 4 functionsPierre-Eric Pelloux-Prayer2019-11-053-4/+279
| | | | | | | | | | | | The implementation doesn't share much with get.c because: * the refactoring needed for get.c to not depend on ctx->Array.VAO would be quite large * glGetVertexArray* would still need to filter pname to only accept the one specified by the spec * these functions are getter, the implementation is trivial (the complexity is in the correct filtering of pname input) Reviewed-by: Marek Olšák <[email protected]>
* mesa: extract helper function from _mesa_GetPointervPierre-Eric Pelloux-Prayer2019-11-052-29/+47
| | | | | | Will be used by EXT_dsa gllGetVertexArrayPointervEXT implementation. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa EnableVertexArrayAttribEXT / DisableVertexArrayAttribEXTPierre-Eric Pelloux-Prayer2019-11-053-2/+38
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glEnableVertexArrayEXT / glDisableVertexArrayEXTPierre-Eric Pelloux-Prayer2019-11-053-2/+69
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add gl_vertex_array_object parameter to client state helpersPierre-Eric Pelloux-Prayer2019-11-051-22/+25
| | | | | | | This will allow to use the same helper for the EXT_direct_state_access implementation. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glVertexArray* functions implementationPierre-Eric Pelloux-Prayer2019-11-051-0/+308
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add vao/vbo lookup helper for EXT_dsaPierre-Eric Pelloux-Prayer2019-11-051-0/+32
| | | | | | | | Add a single helper dealing with the lookup of both the vao and the vbo to avoid duplicating this code in all the glVertexArray* functions. Reviewed-by: Marek Olšák <[email protected]>
* mesa: rework _mesa_lookup_vao_err to allow usage from EXT_dsaPierre-Eric Pelloux-Prayer2019-11-053-18/+36
| | | | | | | | | ARB_dsa and EXT_dsa slightly differs when an uninitialized VAO is requested. In this case ARB_dsa fails while EXT_dsa requires to initialize the object. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glVertexArray* functions declarationsPierre-Eric Pelloux-Prayer2019-11-053-11/+148
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: pass vao as a function paramterPierre-Eric Pelloux-Prayer2019-11-051-60/+94
| | | | | | | This change will allow reusing the same function for the EXT_direct_state_access implementation. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: call nir_lower_flrp only once per shaderMarek Olšák2019-11-041-16/+19
| | | | Reviewed-by: Connor Abbott <[email protected]>
* st/mesa: call nir_opt_access only onceMarek Olšák2019-11-042-2/+2
| | | | Reviewed-by: Connor Abbott <[email protected]>
* state_tracker: Handle texture view min level in st_generate_mipmap()Paul Gofman2019-11-041-1/+7
| | | | | Signed-off-by: Paul Gofman <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: check draw buffer completeness on glClearBufferfi/glClearBufferivLionel Landwerlin2019-11-021-0/+12
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: just use NIR to lower outputs when driver can't read outputsTimothy Arceri2019-11-011-6/+3
| | | | | | | | | | This will allow us to stop lowering gl_FragData in GLSL IR for NIR drivers which means we won't need the special GLSL IR type handling for building the resource list in a NIR based linker. i965 has been doing this since b828f7a27b2b. Reviewed-by: Marek Olšák <[email protected]>
* radeon: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* r200: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* nouveau: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* i915: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* dri: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* mesa: enable msaa in clear_with_quad if neededPierre-Eric Pelloux-Prayer2019-10-311-0/+1
| | | | | | | | | | | If the DrawBuffer sample count is > 1 and msaa is enabled we must also enable msaa when clearing it. Fixes: ea5b7de138b ("radeonsi: make gl_SampleMaskIn = 0x1 when MSAA is disabled") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1991 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Witold Baryluk <[email protected]>
* main: fix several 'may be used uninitialized' warningsAndrii Simiklit2019-10-311-0/+2
| | | | | | | | | | | | This patch fixes approximately 39 warnings in 'texcompress_etc.c' for the release configuration v2: Fixed by adding the unreachable case to the etc2_rgb8_fetch_texel ( Eric Engestrom <[email protected]> ) Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]>