summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* nir/prog: Use nir_bany in kill handlingJason Ekstrand2018-10-261-1/+1
| | | | | | | | | We have a helper that does exactly what the bany_inequal was doing. It emits the same code but is a bit higher level and is designed to operate on a bvec4. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nir/validate: Print when the validation failedJason Ekstrand2018-10-263-4/+5
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use C99 declaration in the for-loop set_foreach() macroEric Engestrom2018-10-251-1/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* util: use C99 declaration in the for-loop hash_table_foreach() macroEric Engestrom2018-10-253-7/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* autotools: include intel_tiled_memcopy.cDylan Baker2018-10-242-0/+7
| | | | | | | | | | | | There are two problems with the fixed patch. First, it fails to create a dependency on the sourced .c file, so changes to intel_tiled_memcpy.c won't trigger a rebuild. It also doesn't get included in the dist tarball. Fixes: 11b1afdc92db98e93f2ca50beeb7fc481a11e708 ("i965/tiled_memcpy: inline movntdqa loads in tiled_to_linear") Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]>
* meson: fix formatting and add extra_files to i965Dylan Baker2018-10-241-10/+12
| | | | | | | | | | extra_files is just a nice way to to tell certain IDEs (and those reading the file) that this file is also a dependency. Meson will use the .d file generated by the compiler to figure out what the target actually depends on. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]>
* mesa/glformats: Remove redundant helper _mesa_base_format_component_countEduardo Lima Mitev2018-10-234-33/+3
| | | | | | | There exists _mesa_components_in_format() which already includes all cases handled in _mesa_base_format_component_count(). Reviewed-by: Tapani Pälli <[email protected]>
* i965/miptree: Use cpu tiling/detiling when mappingScott D Phillips2018-10-231-4/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the (un)map_gtt functions to (un)map_map (map by returning a map) and add new functions (un)map_tiled_memcpy that return a shadow buffer populated with the intel_tiled_memcpy functions. Tiling/detiling with the cpu will be the only way to handle Yf/Ys tiling, when support is added for those formats. v2: Compute extents properly in the x|y-rounded-down case (Chris Wilson) v3: Add units to parameter names of tile_extents (Nanley Chery) Use _mesa_align_malloc for the shadow copy (Nanley) Continue using gtt maps on gen4 (Nanley) v4: Use streaming_load_memcpy when detiling v5: (edited by Ken) Move map_tiled_memcpy above map_movntdqa, so it takes precedence. Add intel_miptree_access_raw, needed after rebasing on commit b499b85b0f2cc0c82b7c9af91502c2814fdc8e67. v6: refactor to changes done for sse41 separation (Tapani) Reviewed-by: Chris Wilson <[email protected]> (v5) Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Tapani Pälli <[email protected]>
* i965/tiled_memcpy: inline movntdqa loads in tiled_to_linearScott D Phillips2018-10-239-90/+426
| | | | | | | | | | | | | | | | | | | | | | | | | The reference for MOVNTDQA says: For WC memory type, the nontemporal hint may be implemented by loading a temporary internal buffer with the equivalent of an aligned cache line without filling this data to the cache. [...] Subsequent MOVNTDQA reads to unread portions of the WC cache line will receive data from the temporary internal buffer if data is available. This hidden cache line sized temporary buffer can improve the read performance from wc maps. v2: Add mfence at start of tiled_to_linear for streaming loads (Chris) v3: add Android build support (Tapani) v4: squash 'fix i915: Fix streaming loads for intel_tiled_memcpy' separate sse41 to own static library (Tapani) Reviewed-by: Chris Wilson <[email protected]> (v2) Reviewed-by: Matt Turner <[email protected]> (v2) Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Tapani Pälli <[email protected]>
* i965: expose type of memcpy instead of memcpy function itselfTapani Pälli2018-10-234-30/+63
| | | | | | | | | | | There is currently no use of returned memcpy functions outside intel_tiled_memcpy. Patch changes intel_get_memcpy to return memcpy type instead of actual function. This makes it easier later to separate streaming load copy in to own static library. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/mesa: Record shader access qualifiers for imagesJason Ekstrand2018-10-234-8/+28
| | | | | | | | | | | | They're not required to be the same as the access flag on the image unit. For hardware that does shader image lowering based on the qualifier (Intel), it may be required for state setup. v2: (by Kenneth Graunke, incorporating feedback from Marek Olšák) - Reduce both access and shader_access to uint16_t to avoid making the pipe_image_view structure larger. Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Only call nir_lower_io_to_scalar_early on scalar ISAsAlyssa Rosenzweig2018-10-221-1/+4
| | | | | | | | | | | | | | | | | | | | | On scalar ISAs, nir_lower_io_to_scalar_early enables significant optimizations. However, on vector ISAs, it is counterproductive and impedes optimal codegen. This patch only calls nir_lower_io_to_scalar_early for scalar ISAs. It appears that at present there are no upstreamed drivers using Gallium, NIR, and a vector ISA, so for existing code, this should be a no-op. However, this patch is necessary for the upcoming Panfrost (Midgard) and Lima (Utgard) compilers, which are vector. With this patch, Panfrost is able to consume NIR directly, rather than TGSI with the TGSI->NIR conversion. For how this affects Lima, see https://www.mail-archive.com/[email protected]/msg189216.html Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* scons: Remove gles option.Jose Fonseca2018-10-192-6/+2
| | | | | | | | It's broken, and WGL state tracker is always built with GLES support noawadays. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* Fix setting indent-tabs-mode in the Emacs .dir-locals.el filesNeil Roberts2018-10-171-1/+1
| | | | | | | Some of the .dir-locals.el had the wrong name for the truthy value so it wasn’t setting indent-tabs-mode. Reviewed-by: Ilia Mirkin <[email protected]>
* i965: Drop assert about number of uniforms in ARB handling.Kenneth Graunke2018-10-151-3/+2
| | | | | | | | | | | My recent prog_to_nir patch started making new sampler uniforms, which apparently increased the number of parameters. We used to poke at the one parameter directly, making it important that there was only one, but we haven't done that in a while. It should be safe to just delete the assertion. Fixes: 1c0f92d8a8c "nir: Create sampler variables in prog_to_nir." Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Create sampler variables in prog_to_nir.Kenneth Graunke2018-10-141-2/+13
| | | | | | | | This is needed for nir_gather_info to actually count the textures, since it operates solely on variables. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965/miptree: Use enum instead of boolean.Rafael Antognolli2018-10-122-3/+4
| | | | | | | | | | | ISL_AUX_USAGE_NONE happens to be the same as "false", but let's do the right thing and use the enum. v2: fix intel_miptree_finish_depth too (Caio) Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/gen10+: Initialize new fields in STATE_BASE_ADDRESSJordan Justen2018-10-111-1/+6
| | | | | | Ref: 263b584d5e4 "i965/skl: Emit extra zeros in STATE_BASE_ADDRESS on Skylake." Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* mesa: Fix pack_uint_Z_FLOAT32()Illia Iorin2018-10-112-18/+9
| | | | | | | | | | | | Fixed pack_uint_Z_FLOAT32 by casting row data to float instead uint. Remove code duplicate function pack_uint_Z_FLOAT32_X24S8. Edited case in "_mesa_get_pack_uint_z_func". Now it looks like "_mesa_get_pack_float_z_func". Remove _mesa_problem call, which was added for debuging this issue. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91433 Signed-off-by: Illia Iorin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* st/glsl_to_tgsi: initialise need_uarl in contructorDave Airlie2018-10-111-0/+1
| | | | | | Found by coverity Reviewed-by: Marek Olšák <[email protected]>
* glspirv: drop pointless assert (size_t is unsigned)Dave Airlie2018-10-111-2/+0
| | | | | | Found by coverity Reviewed-by: Alejandro Piñeiro <[email protected]>
* i965: fallback RGBX to RGBA in glEGLImageTargetRenderbufferStorageOESChystiakov, Dmytro2018-10-081-26/+37
| | | | | | | | | | | | | | | In the same fashion as is done for glEGLImageTextureTarget2D. v2: share the fallback which sets baseformat and internalformat correctly which makes both of the tests pass (Tapani) Fixes android.hardware.nativehardware.cts.AHardwareBufferNativeTests: #SingleLayer_ColorTest_GpuColorOutputCpuRead_R8G8B8X8_UNORM #SingleLayer_ColorTest_GpuColorOutputIsRenderable_R8G8B8X8_UNORM Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
* Revert "mesa: remove unnecessary 'sort by year' for the GL extensions"Emil Velikov2018-10-031-2/+44
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3d81e11b49366b5636b8524ba0f8c7076e3fdf34. As reported by Federico, some games require the 'sort by year' since they truncate the extensions which do not fit the fixed size string array. Seemingly I did not consider that, as the documentation (both Mesa and Nvidia) mentions about program crashes ... which are worked around by setting the env. variable. This commit reinstates the workaround and enhances the documentation. Cc: Marek Olšák <[email protected]> Cc: Ian Romanick <[email protected]> Reported-by: Federico Dossena <[email protected]> Fixes: 3d81e11b493 ("mesa: remove unnecessary 'sort by year' for the GL extensions") Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Federico Dossena <[email protected]>
* mesa: reorder and document the tokens in glheader.hEmil Velikov2018-10-031-16/+23
| | | | | | | | Split into different sections, document each one as well as strange cases like GL_ATI_texture_compression_3dc. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove duplicate declarations from glheader.hEmil Velikov2018-10-031-54/+0
| | | | | | | | | Remove all the desktop GL and GLX entries from the list. Former are pulled by the gl.h and glext.h includes at the top while the latter are no longer needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: reference __DRI_ATTRIB_SWAP_COPY token over the GLX oneEmil Velikov2018-10-031-1/+1
| | | | | | | | Earlier commit updated the code to use the DRI tokens, yet forgot to update the comment. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i915: reference __DRI_ATTRIB_SWAP_COPY token over the GLX oneEmil Velikov2018-10-031-1/+1
| | | | | | | | Earlier commit updated the code to use the DRI tokens, yet forgot to update the comment. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* dri/common: move the required GLX_* token definitions locallyEmil Velikov2018-10-031-0/+14
| | | | | | | | | | Will allow us to remove even bigger hack elsewhere. But more importantly, we should not be using _any_ GLX tokens in DRI. Document the gory details about the current side-effects. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* dri/common: use __DRI_ATTRIB_SWAP* instances when describing db_modesEmil Velikov2018-10-031-5/+6
| | | | | | | | Somewhat recently Thomas Hellstrom added the respective DRI tokens and updated the drivers. Update the documentation to match reality. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fold _glapi_check_multithread() back into _mesa_make_currentEmil Velikov2018-10-035-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | With commit c6c0f947142, back in 2006 Brian removed the _glapi_check_multithread() call from core mesa - _mesa_make_current. It was done to remove fairly awkward #ifdef guard which caused subtle differences in core mesa. Since that guard is long gone, we can drop the duplication and reintroduce the call in core. Note that the function is was missing when using EGL + classic dri HW drivers. Yet on TLS builds it's a no-op, so we're safe. Any non TLS users - more or less anything !Linux (or even musl on Linux up-to semi-recently) may have experienced problems. v2: don't remove the call from swrast - move it to core (Eric) Cc: Eric Anholt <[email protected]> Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: use C99 initializer in get_gl_override()Emil Velikov2018-10-031-4/+4
| | | | | | | | | The overrides array contains entries indexed on the gl_api enum. Use a C99 initializer to make it a bit more obvious. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965: Replace checks for rb->Name with FlipY (v2)Fritz Koenig2018-10-022-13/+11
| | | | | | | | | | | | | In the GL_MESA_framebuffer_flip_y implementation _mesa_is_winsys_fbo checks were replaced with FlipY checks. rb->Name is also used to determine if a buffer is winsys. v2: Fixes annotation [for emil] Fixes: ab05dd183cc ("i965: implement GL_MESA_framebuffer_flip_y [v3]") Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* st/mesa: do not call update_framebuffer_size with NULL pointerErik Faye-Lund2018-09-271-1/+2
| | | | | | | | | | | | | | | | In st_renderbuffer_alloc_storage, we avoid allocating storage for zero-sized buffers, leading to this pointer being NULL. We already take care to avoid dereferencing these pointers for color-buffers, but not for depth/stencil-buffers. So let's thread a bit more carefully here. This avoids a crash while running Piglit's glx/glx-visuals-stencil test, both on virgl and r600g. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Guillaume Charifi <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* intel/isl: Add a unit suffixes to some struct fields and variablesJason Ekstrand2018-09-269-63/+63
| | | | | | | | | | | | | I was about to make the claim to someone that every field in isl_surf is either an enum or has explicit units. Then I looked at isl_surf and discovered this claim was wrong. We should fix that. This commit does a few refactors: * Add _B suffixes to some struct fields * Add _B to some variables and parameters * Rename row_pitch_tiles -> row_pitch_tl Reviewed-by: Nanley Chery <[email protected]>
* intel/compiler: Export TCS passthrough creationCaio Marcelo de Oliveira Filho2018-09-251-82/+1
| | | | | | | Move create_passthrough_tcs() from i965 so can be used in other contexts. Acked-by: Jason Ekstrand <[email protected]>
* mesa/st: In the precense of integer buffers enable per buffer blendingGert Wollny2018-09-251-0/+6
| | | | | | | | | | | | | | | Since blending will be disabled later for integer formats we have to consider that in the case of a mixed set of integer/non-integer format buffers blending must be handled on a per buffer basis. Fixes on r600: dEQP-GLES31.functional.draw_buffers_indexed.random. max_required_draw_buffers.13 Fixes: 8fb966688bc1053a48e8ee7f7394ce030bcfd345 st/mesa: Disable blending for integer formats. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965/icl: Set Enabled Texel Offset Precision Fix bitAnuj Phogat2018-09-212-0/+11
| | | | | | | | | | h/w specification requires this bit to be always set. V2: Fix bit mask (Chris Wilson) Suggested-by: Kenneth Graunke <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl_to_tgsi: invert gl_SamplePosition.y for the default framebufferMarek Olšák2018-09-211-1/+34
| | | | | | | Fixes dEQP-GLES31.functional.shaders.sample_variables.sample_pos.correctness.default_framebuffer with --deqp-gl-config-name=rgba8888d24s8ms4 Cc: 18.1 18.2 <[email protected]>
* st/mesa: silenced unhanded enum warning in st_glsl_to_tgsi.cppBrian Paul2018-09-201-0/+1
| | | | | | | Add ir_intrinsic_begin_fragment_shader_ordering switch case to silence warning Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: use GLsizeiptrARB, GLintptrARB in bufferobj.cBrian Paul2018-09-201-3/+3
| | | | | | | | | | | | | | | The function pointer declarations in dd.h for the BufferData() and BufferSubData() use the ARB-suffixed datatypes. This patch changes the buffer_data_fallback() and buffer_sub_data_fallback() functions to use those datatypes too. This fixes a build warning when building 32-bit libraries. Evidently, GLsizeiptrARB and GLsizeiptr are defined differently in that situation. All all implementations of these driver hooks use the ARB-suffixed types. Reviewed-by: Mathias Fröhlich <[email protected]>
* i965: remove outdated comment about TCS passthroughCaio Marcelo de Oliveira Filho2018-09-201-4/+0
| | | | | | | | Since commit 75881bed9e1 "i965: Rework the TCS passthrough shader to use NIR." the created nir_shader is not dummy, and it is compiled by the backend like the others. Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "mesa: only update framebuffer-state for clears"Jakob Bornecrantz2018-09-191-20/+14
| | | | This reverts commit fb86365148d5b8f3f06c5e42d9c8440fc1f6693f.
* mesa: only update framebuffer-state for clearsErik Faye-Lund2018-09-191-14/+20
| | | | | | | | If we update the program-state etc, we risk compiling needless shaders, which can cost quite a bit of performance. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable EXT_framebuffer_object in core profileTimothy Arceri2018-09-183-25/+15
| | | | | | | | | | | | Since user defined names are not allowed in core profile we remove the allow_user_names bool and just check if we have a core profile like all other buffer/texture object handling code does. This extension is required by "Wolfenstein: The Old Blood" and is exposed in core in the Nvidia binary driver. Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option texture_depthTimothy Arceri2018-09-181-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option fthrottle_modeTimothy Arceri2018-09-181-0/+12
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option def_max_anisotropyTimothy Arceri2018-09-181-0/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option no_neg_lod_biasTimothy Arceri2018-09-181-0/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option round_modeTimothy Arceri2018-09-181-0/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: move legacy dri config option dither_modeTimothy Arceri2018-09-181-0/+12
| | | | Reviewed-by: Marek Olšák <[email protected]>