summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix immediate mode with tessellation and varying patch verticesMarek Olšák2020-02-181-0/+2
| | | | | | | 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/3861> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* mesa: don't use memset in glDrawArraysMarek Olšák2020-02-181-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* mesa: document _mesa_prim::begin/endMarek Olšák2020-02-181-0/+12
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* vbo: remove redundant code in vbo_exec_fixup_vertexMarek Olšák2020-02-181-7/+0
| | | | | | | Callers of this function also set FLUSH_STORED_VERTICES for attr == 0. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* vbo: remove dead code in vbo_can_merge_primsMarek Olšák2020-02-181-4/+3
| | | | | | | This is only used by immediate mode and the values are immutable. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* st/mesa: try to fix MSVC build failure due to ALWAYS_INLINEMarek Olšák2020-02-181-1/+4
| | | | | | Fixes: 11db8e0e00a72884ba9f ("st/mesa: optimize st_update_array with ALWAYSINLINE") Tested-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
* st/nir: Unify inputs_read/outputs_written before serializing NIRDanylo Piliaiev2020-02-181-22/+19
| | | | | | | | | | | | | | | Otherwise input/output interfaces won't be unified when reading NIR from a cache. Fixes piglit test on iris: clip-distance-vs-gs-out.shader_test Fixes: 19ed12af Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787>
* st/mesa: simplify releasing the current attrib bufferMarek Olšák2020-02-141-9/+13
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st/mesa: make st_setup_current staticMarek Olšák2020-02-142-8/+1
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st/mesa: change some loops from while to do..while in st_atom_array.cMarek Olšák2020-02-141-4/+4
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st/mesa: simplify determination whether a draw needs min/max indexMarek Olšák2020-02-146-5/+38
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st/mesa: simplify determination whether a draw has user vertex buffersMarek Olšák2020-02-141-3/+4
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st/mesa: always inline the code setting non-64bit vertex elementsMarek Olšák2020-02-141-46/+63
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* mesa: remove unused _mesa_draw_indirectMarek Olšák2020-02-143-83/+1
| | | | | | | All drivers that expose ARB_draw_indirect also set the driver callback. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* mesa: translate into gallium vertex formats in mesa/mainMarek Olšák2020-02-143-261/+259
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
* st: add support for INTEL_blackhole_renderLionel Landwerlin2020-02-132-0/+4
| | | | | | | | | | | | | | | | Adding a new CSO proved to be fairly difficult especially because this extension affect draw/dispatch/blit alike. Instead this change passes the state of the noop into the entry points emitting the operations affected. v2: Fix assert in default pipe caps v3: Drop whitespace changes (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>
* i965: enable INTEL_blackhole_renderLionel Landwerlin2020-02-135-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: condition the extension on context isolation support from the kernel (Chris) v3: (Lionel) The initial version of this change used a feature of the Gen7+ command parser to turn the primitive instructions into no-ops. Unfortunately this doesn't play well with how we're using the hardware outside of the user submitted commands. For example resolves are implicit operations which should not be turned into no-ops as part of the previously submitted commands (before blackhole_render is enabled) might not be disabled. For example this sequence : glClear(); glEnable(GL_BLACKHOLE_RENDER_INTEL); glDrawArrays(...); glReadPixels(...); glDisable(GL_BLACKHOLE_RENDER_INTEL); While clear has been emitted outside the blackhole render, it should still be resolved properly in the read pixels. Hence we need to be more selective and only disable user submitted commands. This v3 manually turns primitives into MI_NOOP if blackhole render is enabled. This lets us enable this feature on any platform. v4: Limit support to gen7.5+ (Lionel) v5: Enable Gen7.5 support again, requires a kernel update of the command parser (Lionel) v6: Disable Gen7.5 again... Kernel devs want these patches landed before they accept the kernel patches to whitelist INSTPM (Lionel) v7: Simplify change by never holding noop (there was a shortcoming in the test not considering fast clears) Only program register using MI_LRI (Lionel) v8: Switch to software managed blackhole (BDW hangs on compute batches...) v9: Simplify the noop state tracking (Lionel) v10: Don't modify flush function (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v8) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>
* mesa: add INTEL_blackhole_renderLionel Landwerlin2020-02-133-0/+17
| | | | | | | | | | | | | | | v2: Implement missing Enable/Disable (Emil) v3: Drop unused NewIntelBlackholeRender (Ken) v4: Bring back NewIntelBlackholeRender as i965 implementation uses it again (Lionel) v5: Drop atom (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>
* Rename nir_lower_constant_initializers to nir_lower_variable_initalizersArcady Goldmints-Orlov2020-02-121-1/+1
| | | | | | | | | This is naming is more clear as nir_variables can be initializes not just with a nir_constant but with a pointer to another nir_variable. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047>
* st/mesa: optimize st_update_array with ALWAYSINLINEMarek Olšák2020-02-111-2/+8
| | | | | | | | The time spent in st_update_array is reduced by 5-10%. Reviewed-by: Mathias Fröhlich <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: don't use bitfields in _mesa_primMarek Olšák2020-02-115-12/+4
| | | | | | | | This is better. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: remove unused _mesa_prim::is_indirectMarek Olšák2020-02-116-13/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* í965: don't use _mesa_prim::is_indirectMarek Olšák2020-02-112-8/+8
| | | | | | | the vbo change only affects i965 Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: merge use_buffer_objects into vbo_CreateContext to skip the big mallocMarek Olšák2020-02-1116-72/+39
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: clean up resetting vertex attribsMarek Olšák2020-02-111-33/+19
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: also map the immediate mode buffer for readMarek Olšák2020-02-111-2/+8
| | | | | | | | | | because we read from it sometimes and we want cached reads. We can only do it with the persistent mapping, because the non-persistent mapping uses incompatible flags. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: delay flagging FLUSH_STORED_VERTICES until glEndMarek Olšák2020-02-111-4/+5
| | | | | | | Only state changes see this, which can't occur before glEnd. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: add/update unlikely statements in ATTR_UNIONMarek Olšák2020-02-111-3/+3
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: increase the size of the immediate mode buffer to decrease draw countMarek Olšák2020-02-111-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: use FlushVertices flags properly and clear NeedFlush correctlyMarek Olšák2020-02-111-11/+30
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: fix resizing 64-bit vertex attributesMarek Olšák2020-02-111-0/+6
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: optimize resizing vertex attributes during immediate modeMarek Olšák2020-02-111-62/+53
| | | | | | | | | Just move data manually instead of copying all attributes back and forth. This increases performance by 5% for Viewperf11/Catia - first scene. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: don't store glVertex values temporarily into execMarek Olšák2020-02-112-10/+49
| | | | | | | This improves performance by 4.3% in Viewperf11/Catia, first scene. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: pass only either uint32_t or uint64_t into ATTR_UNIONMarek Olšák2020-02-113-8/+23
| | | | | | | This makes the next commit possible. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: don't set FLUSH_UPDATE_CURRENT for glVertexMarek Olšák2020-02-111-2/+3
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: keep the immediate mode buffer always mapped for simplicityMarek Olšák2020-02-113-26/+16
| | | | | | | It only unmaps when it draws with a non-persistent buffer. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: don't check ctx->NewState twice in glBeginMarek Olšák2020-02-111-3/+0
| | | | | | | _mesa_valid_to_render does it too. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: remove a funky recursive call in glBeginMarek Olšák2020-02-111-5/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: interleave attrsz, attrtype, and active_sz in memoryMarek Olšák2020-02-114-55/+56
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: remove immediate mode code that doesn't do anything and simplify stuffMarek Olšák2020-02-115-53/+3
| | | | | | | no change in behavior Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: don't unmap persistent buffer mappings for glBegin/EndMarek Olšák2020-02-113-9/+41
| | | | | | | This significantly improves performance by lowering CPU overhead. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: skip FlushMappedBufferRange for glBegin/End by using a persistent mappingMarek Olšák2020-02-111-6/+16
| | | | | | | | | This is a preparation for the next commit and just isolates the removal of GL_MAP_FLUSH_EXPLICIT_BIT and other map flags that don't make sense with UNSYNCHRONIZED. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* vbo: create the immediate mode buffer only in vbo_exec_vtx_mapMarek Olšák2020-02-111-10/+0
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: import PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET handlingMarek Olšák2020-02-116-15/+21
| | | | | | | This should decrease overhead in st_update_array. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: remove FLUSH_CURRENT calls that have no effectMarek Olšák2020-02-115-11/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: fix incorrect uses of FLUSH_CURRENTMarek Olšák2020-02-112-4/+4
| | | | | | | | | FLUSH_CURRENT is used to copy attributes from the vbo module to Current.Attrib. It flushes vertices too, but that's a side effect, not the intent. Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* i965: remove duplicated commentLeandro Ribeiro2020-02-071-2/+1
| | | | | | | Signed-off-by: Leandro Ribeiro <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2416> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2416>
* mesa/st: Move the SYSTEM_VALUE -> TGSI_SEMANTIC map to tgsi_from_mesa.Eric Anholt2020-02-052-93/+3
| | | | | | | | | This will let us reuse the table from nir-to-tgsi. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506>
* glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.Eric Anholt2020-02-051-4/+3
| | | | | | | | | | | | | | | | | This means you can directly use format utils on it without having to have your own GL enum to number-of-components switch statement (or whatever) in your vulkan backend. Thanks to imirkin for fixing up the nouveau driver (and a couple of core details). This fixes the computed qualifiers for EXT_shader_image_load_store's non-integer sizeNxM qualifiers, which we don't have tests for. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v3d) Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355>
* mesa: Clean up some endianness adapters for shader image formats.Eric Anholt2020-02-052-19/+8
| | | | | | | | We already had a uint version in formats.h, move the snorm/unorm ones there, too. Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355>