aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: enable ARB_gpu_shader_int64 in compat profileTapani Pälli2019-10-302-39/+39
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add [Program]Uniform*64ARB display list supportTapani Pälli2019-10-301-0/+979
| | | | | | | | This is required for int64 to be enabled in compat profile. Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: lower global vars to local after lowering clipErik Faye-Lund2019-10-281-0/+1
| | | | | | | | | | | | | | | | When this code was merged, this wasn't necessary because the state-tracker would do it later anyway. But this recently got changed, without changing the code that depended on this. Arguably, this was a mistake in the lowering pass to begin with. Either way, let's fix it by not assuming that the lowering code gets called later when it's not needed. This fixed user-defined clip-planes in Zink. Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: eaffdad1082 ("st/mesa: don't lower_global_vars_to_local for VS if there are no dead inputs") Reviewed-by: Marek Olšák <[email protected]>
* intel: Support HIZ_CCS in isl_surf_get_ccs_surfNanley Chery2019-10-282-8/+8
| | | | | | | Add an extra aux parameter which will be filled out with CCS if the first two isl_surf parameters fit the requirements for HiZ_CCS. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Avoid -Wswitch for the Gen12 aux modesNanley Chery2019-10-281-0/+3
| | | | | | | | Avoid the compiler warnings for the new enums that will be introduced in a future commit. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* util: remove LIST_IS_EMPTY macroTimothy Arceri2019-10-281-4/+4
| | | | | | | Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-281-1/+1
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_DEL macroTimothy Arceri2019-10-282-3/+3
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADD macroTimothy Arceri2019-10-281-1/+1
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADDTAIL macroTimothy Arceri2019-10-281-2/+2
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_INITHEAD macroTimothy Arceri2019-10-281-3/+3
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* i965: setup sized internalformat for MESA_FORMAT_R10G10B10A2_UNORMTapani Pälli2019-10-281-1/+9
| | | | | | | | | | | | | | | Commit d2b60e433e5 introduced restrictions (as per GLES spec) on the internal format. We need to setup a sized format for the texture image so framebuffers created with that are considered complete. This change fixes following Android CTS test in AHardwareBufferNativeTests category: SingleLayer_ColorTest_GpuColorOutputAndSampledImage_R10G10B10A2_UNORM Signed-off-by: Tapani Pälli <[email protected]> Fixes: d2b60e433e5 ("mesa/main: R10G10B10_(A2) formats are not color renderable in ES") Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/main: Ignore filter state for MS texture completenessIllia Iorin2019-10-251-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | After the discussion in https://github.com/KhronosGroup/OpenGL-API/issues/45 the section 8.17 (texture completeness) of the OpenGL 4.6 core profile was changed to explicitly say that multisample texture completeness ignores filter state of the texture. "Using the preceding definitions, a texture is complete unless any of the following conditions hold true: ... - The minification filter requires a mipmap (is neither NEAREST nor LINEAR), the texture is not multisample, and the texture is not mipmap complete. - The texture is not multisample; either the magnification filter is not NEAREST, or the minification filter is neither NEAREST nor NEAREST_- MIPMAP_NEAREST; and any of – The internal format of the texture is integer (see table 8.12). – The internal format is STENCIL_INDEX. – The internal format is DEPTH_STENCIL, and the value of DEPTH_- STENCIL_TEXTURE_MODE for the texture is STENCIL_INDEX." Signed-off-by: Danylo Piliaiev <[email protected]> Signed-off-by: Illia Iorin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "mesa/main: Fix multisample texture initialize"Illia Iorin2019-10-251-25/+13
| | | | | | | | | | This reverts commit a113a42e7369a4e43a1db1c9a7a35a3f7175615e. Per https://github.com/KhronosGroup/OpenGL-API/issues/45 it was a wrong way to fix the issue. Signed-off-by: Illia Iorin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Fix a bunch of undefined left-shifts in u_format_*Adam Jackson2019-10-241-3/+3
| | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* st/mesa: use pipe_screen::finalize_nirMarek Olšák2019-10-236-25/+89
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: update VS shader_info for NIR after lowering passesMarek Olšák2019-10-231-0/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: assign driver locations for VS inputs for NIR before cachingMarek Olšák2019-10-234-9/+10
| | | | | | | fix up edge flags in the NIR pass, because st/mesa doesn't touch the inputs after caching Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: don't lower_global_vars_to_local for VS if there are no dead inputsMarek Olšák2019-10-231-2/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: move some NIR lowering before shader cachingMarek Olšák2019-10-233-14/+23
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: move registers to their own headerLionel Landwerlin2019-10-232-1/+2
| | | | | | | Will conflict with the genxml RPSTAT register. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* st/mesa: Silence chatty debug printfKenneth Graunke2019-10-221-2/+4
| | | | | | Other debug_printf's in this file are in if (0) blocks. Trivial.
* st/mesa: Map MESA_FORMAT_RGB_UNORM8 <-> PIPE_FORMAT_R8G8B8_UNORMChris Wilson2019-10-221-0/+6
| | | | | | | | This is useful for PBO texture upload with GL_RGB and GL_UNSIGNED_BYTE. v2: Vasily Khoruzhick provided an update for the Lima CI expectations. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: replace pipe_shader_state with tgsi_token* in st_vp_variantMarek Olšák2019-10-224-36/+48
| | | | | | we don't need more than that Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st: assert that lowering is supportedErik Faye-Lund2019-10-221-0/+12
| | | | | | | | | Some of these lowerings aren't supported for drivers that supports tesselation and geometry shaders. Let's add a couple of asserts to make it obvious if these have been enabled when it's not possible. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: only require ESSL 3.1 for geometry shadersIago Toral Quiroga2019-10-211-1/+1
| | | | | | | | | According to the OES_geometry_shader spec, section Dependencies: "OpenGL ES 3.1 and OpenGL ES Shading Language 3.10 are required." Reviewed-by: Kristian H. Kristensen <[email protected]>
* mesa: Redefine the RG formats as array formats.Eric Anholt2019-10-2015-117/+67
| | | | | | | | | This is the layout used in the GL API, and maps directly to PIPE formats with no endianness trickery. As with the LA change, this fixes big-endian fetching from texbos. Also cleans up some endian shenanigans in shader images. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Replace MESA_FORMAT_L8A8/A8L8 UNORM/SNORM/SRGB with an array format.Eric Anholt2019-10-2020-103/+62
| | | | | | | | | | | | | | | | | The array format is what the GL API wants (fixing texbos on big-endian), and matches directly to gallium's corresponding array format. The only driver exposing A8L8 was radeon/r200 in big-endian, where the HW's underlying format was trying to read as array and we needed to flip things around to make our packed format come out right (note that while the radeon format tables had both AL and LA, ChooseTextureFormat would only pick one of them based on endianness). v2: Don't make r200/radeon use endian swaps. v3: Rebase on dropping the r200 _be/_le format table removal patch v4: reword commit message to explain why we can drop both formats from radeon. Reviewed-by: Marek Olšák <[email protected]> (v1)