summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* vbo: merge draws even when begin==0 or end==0Marek Olšák2020-03-041-6/+25
| | | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: merge more primitive types for glBegin/End (v2)Marek Olšák2020-03-044-50/+43
| | | | | | | v2: clean it up more Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* mesa: deduplicate draw indirect functionsMarek Olšák2020-03-041-121/+36
| | | | | Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* mesa: optimize get_index_sizeMarek Olšák2020-03-041-16/+9
| | | | | Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* mesa: remove _mesa_index_buffer::index_size in favor of index_size_shiftMarek Olšák2020-03-0415-47/+40
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Suggested-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* Revert "mesa: check for z=0 in _mesa_Vertex3dv()"Marek Olšák2020-03-041-4/+1
| | | | | | | | | | | | | | | This reverts commit f04d7439a0ad6e13ff2912ff824553b6bcf511a4. It no longer helps performance and the current vbo implementation is faster anyway. The app that hit this was a CAD program called Spazio3D. It made pretty terrible use of the OpenGL API and we sent them some tips for improvements. I'm assuming they've fixed this by now. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: fold code from vbo_exec_fixup_vertex to vbo_exec_wrap_upgrade_vertexMarek Olšák2020-03-041-5/+6
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: clean up conditional blocks in ATTR_UNIONMarek Olšák2020-03-041-5/+3
| | | | | | | | | Move the A != 0 code to the first block. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: handle GS and tess primitive types when splitting Begin/EndMarek Olšák2020-03-041-0/+27
| | | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: clean up vbo_copy_verticesMarek Olšák2020-03-041-38/+19
| | | | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: deduplicate copy_vertices functionsMarek Olšák2020-03-044-158/+117
| | | | | | | | | There are some differences in exec, but those look like bug fixes not ported to vbo_save. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* vbo: don't look at the second draw's count when merging 2 glBegin/End drawsMarek Olšák2020-03-041-3/+3
| | | | | | | | Only the first count needs to be aligned. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* mesa: replace some index_size multiplications and divisions with shiftsMarek Olšák2020-03-044-12/+12
| | | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* mesa: add index_size_shift = log2(index_size) into _mesa_index_bufferMarek Olšák2020-03-045-19/+30
| | | | | | | | for faster division Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* gallium: add PIPE_CAP_PSIZ_CLAMPEDLouis-Francis Ratté-Boulianne2020-03-031-0/+2
| | | | | | | | | | | This new capability indicates that the point size has been clamped. This also means that the gl_PointSize has been modified and that its value should be lowered for transform feedback, if needed. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* gallium: add PIPE_CAP_VIEWPORT_TRANSFORM_LOWEREDLouis-Francis Ratté-Boulianne2020-03-031-0/+5
| | | | | | | | | | | This new capability indicates that the nir_lower_viewport_transform pass is enabled. This also means that the gl_Position value is modified and should be lowered for transform feedback, if needed. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* gallium: add PIPE_CAP_PACKED_STREAM_OUTPUTLouis-Francis Ratté-Boulianne2020-03-031-0/+3
| | | | | | | | | | | Setting this cap to 0 (default is 1) should disable packing optimization for stream output (e.g. GL transform feedback captured variables). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* glsl/linker: add xfb workaround for modified built-in variablesLouis-Francis Ratté-Boulianne2020-03-031-0/+3
| | | | | | | | | | | | | | | | | | | | | Some lowering passes modify the value of built-in variables in order for drivers to work properly. However, modifying such values will also break transform feedback as the captured value won't match what's expected. For example, on some hardware, the vertex shaders are expected to output gl_Position in screen space. However, the transform feedback captured value is still supposed to be the world-space coordinates (see nir_lower_viewport_transform). To fix that, we create a new variable that contains the pre-transformation value and use it for transform feedback instead of the built-in one. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* glsl/linker: add DisableTransformFeedbackPacking workaroundLouis-Francis Ratté-Boulianne2020-03-031-0/+9
| | | | | | | | | | | | | | | | | Some drivers (e.g. Panfrost) don't support packing of varyings when used for transform feedback. This new constant ensures that any varying used for xfb is aligned at the start of a slot and won't be packed with other varyings. Scenarios where transform feedback declarations are related to an array element or a struct member will be handled in a subsequent patch. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> (Fix order of arguments to varying_matches()) Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* st/mesa: allow TXB2/TXL2 to work with cube array shadow texturesIlia Mirkin2020-03-021-8/+18
| | | | | | | | | It's a bit asymmetric, but it's such a contrived use-case, and not a lot of drivers will support it. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4014>
* intel: fix the gen 11 compute shader scratch IDsPaulo Zanoni2020-03-031-1/+6
| | | | | | | | | | | | | | | | | | | Scratch space allocation is based on the number of threads in the base configuration, and we only have one base configuration for ICL, with 8 subslices. This fixes an issue with Aztec on Vulkan in a machine with a configuration that's not the base. The issue looks like a regression from b9e93db20896, but it seems things are broken since forever, just not easily reproducible. v2: Reimplement it using the subslices variable. Don't touch TGL. Cc: [email protected] Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4006>
* mesa/st: fix formats required for EXT_texture_norm16Tapani Pälli2020-03-021-7/+0
| | | | | | | | | | | | Earlier commit did not take in to account that lists required for rendering and texturing are parsed separately. This commit simply removes formats added to the other list. Fixes: de4eb9a3bb9 ("mesa/st: toggle EXT_texture_norm16 based on format support") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3961> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3961>
* mesa: fix _mesa_draw_nonzero_divisor_bits to return nonzero divisorsIlia Mirkin2020-03-011-1/+1
| | | | | | | | | | | The bitmask is _EffEnabledNonZeroDivisor, so no need to invert it before returning. Fixes: fd6636ebc06d (st/mesa: simplify determination whether a draw needs min/max index) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4009>
* mesa: fix 11 warningsMarek Olšák2020-02-274-5/+7
| | | | | Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3970>
* nir: fix 5 warningsMarek Olšák2020-02-271-1/+1
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3970>
* mesa: fix incorrect prim.begin/end for glMultiDrawElementsMarek Olšák2020-02-281-2/+2
| | | | | | | | | This has no effect on Gallium, but it affects tnl. Cc: 19.3 20.0 <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: optimize glMultiDrawArrays, call Draw only once (v2)Marek Olšák2020-02-281-16/+22
| | | | | | | v2: use the macros Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: don't unroll glMultiDrawElements if one count is 0Marek Olšák2020-02-281-10/+0
| | | | | | | | let the driver skip or submit an empty draw call. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: clean up glMultiDrawElements code, use alloca for small draw count (v2)Marek Olšák2020-02-281-18/+38
| | | | | | | | | v2: use calloc, add reusable macros Reviewed-by: Mathias Fröhlich <[email protected]> (v1) Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> (v1) Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: move num_instances and base_instance out of _mesa_primMarek Olšák2020-02-2826-78/+120
| | | | | | | | They are never used by multi draws and internal draws. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: remove redundant _mesa_prim::is_indexedMarek Olšák2020-02-286-16/+10
| | | | | | | Instead, check (ib != NULL) like all other drivers. Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa/i965: remove _mesa_prim::indirect_offsetMarek Olšák2020-02-286-20/+31
| | | | | | | Only i965 was using it. Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* gallium: pass cso_velems_state into cso_context instead of pipe_vertex_elementMarek Olšák2020-02-2810-46/+53
| | | | | | | This removes one memcpy from the CSO hashing code. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: remove unused "indirect" parameter from Driver.DrawMarek Olšák2020-02-2818-52/+35
| | | | | Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* i965: stop using "indirect" parameter from Driver.Draw (non-indirect)Marek Olšák2020-02-284-15/+26
| | | | | | | | | The parameter will be removed. v2: added UNUSED, removed "!!" Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: Flush vertices before changing the OpenGL state.Mathias Fröhlich2020-02-271-4/+10
| | | | | | | | Reviewed-by: Marek Olšák <[email protected]> CC: <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
* mesa: Check for OpenGL state change before flushing vertices.Mathias Fröhlich2020-02-271-2/+4
| | | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
* mesa: call FLUSH_VERTICES before updating CoordReplaceMarek Olšák2020-02-261-1/+2
| | | | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Cc: 20.0 <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3947> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3947>
* mesa: remove leftovers from ARB_shadow_ambientMarek Olšák2020-02-261-2/+0
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3947>
* mesa/st: toggle EXT_texture_norm16 based on format supportTapani Pälli2020-02-261-0/+12
| | | | | | | | | | Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2556 Fixes: 7f467d4f738 ("mesa: GL_EXT_texture_norm16 extension plumbing") Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941>
* i965: toggle on EXT_texture_norm16Tapani Pälli2020-02-261-0/+1
| | | | | | | Fixes: 7f467d4f738 ("mesa: GL_EXT_texture_norm16 extension plumbing") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941>
* mesa: introduce boolean toggle for EXT_texture_norm16Tapani Pälli2020-02-262-1/+2
| | | | | | | Fixes: 7f467d4f738 ("mesa: GL_EXT_texture_norm16 extension plumbing") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3941>
* prog_to_nir: Reuse glsl_get_sampler_dim_coordinate_components().Eric Anholt2020-02-241-19/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
* gallium: Add a cap for enabling lowering of image load/store intrinsics.Eric Anholt2020-02-241-0/+2
| | | | | | | | | The deref stuff is hard to handle in a backend supporting dynamic indexing, while the lowering can easily turn that into the same kind of dynamic indexing we do for textures, UBOs, and SSBOs. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
* nir: Make image lowering optionally handle the !bindless case as well.Eric Anholt2020-02-241-1/+1
| | | | | | | | iris was doing this internally, but let's rename the function and move the iris code there. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
* i965: Use isl_aux_state_transition_write()Nanley Chery2020-02-241-183/+16
| | | | | | | | v2. Dirty shadow miptrees independent of aux. (Jason) Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2957> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2957>
* i965: Use ISL's access preparation functionsNanley Chery2020-02-241-257/+35
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2957>
* glapi/copyimage: Implement CopyImageSubDataNVIndrajit Kumar Das2020-02-246-26/+194
| | | | | | | | | | | Implement CopyImageSubDataNV from NV_copy_image spec. This is derived out of the existing implementation of CopyImageSubData. It differs from CopyImageSubData in accordance with the differences laid down in the ARB_copy_image spec. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3649> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3649>
* i965: Do not generate D16 B5G6R5_UNORM configs on gen < 8Danylo Piliaiev2020-02-201-11/+23
| | | | | | | | | | | | | | We don't support MESA_FORMAT_Z_UNORM16 before Gen8, see intel_screen_init_surface_formats. As a consequence disables B5G6R5_UNORM configs with depth on gen < 6. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2275 CC: <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3206> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3206>
* main/get: Converted type conversion macros to inline functionsKristian H. Kristensen2020-02-191-20/+58
| | | | | | | | | | | | | | | Quiet warnings when called with a GLubyte: src/mesa/main/get.c:3215:19: warning: result of comparison of constant 32767 with expression of type 'GLubyte' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] params[0] = INT_TO_FIXED(((GLubyte *) p)[0]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesa/main/get.c:78:38: note: expanded from macro 'INT_TO_FIXED' ~~~ ^ ~~~~~~~~ Delete ENUM_TO_INT64, ENUM_TO_FIXED and BOOLEAN_TO_INT64 which aren't used. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3866>