summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* dri: delete gen-symbol-redefs.pyEric Engestrom2020-02-051-68/+0
| | | | | | | | | | | Introduced in ba10d79cca8d93c9f366 but it looks like it was never wired into anything. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3669> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3669>
* mesa: implement missing display list functions while switching to the templateMarek Olšák2020-02-041-86/+718
| | | | | | | | The vbo_init_tmp.h template tells us which functions are unimplemented. Reviewed-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* vbo: move reusable code from vbo_attrib_tmp.h into vbo_util.hMarek Olšák2020-02-044-98/+135
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* vbo: use the template for save GLvertexformat initializationMarek Olšák2020-02-041-151/+6
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* vbo: use the template for noop GLvertexformat initializationMarek Olšák2020-02-044-332/+27
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* vbo: move GLvertexformat initialization into a template header file for reuseMarek Olšák2020-02-044-172/+205
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* softpipe: Refactor pipe_get/put_tile_rgba_* paths.Eric Anholt2020-02-041-5/+5
| | | | | | | | | We always want the same behavior of choosing which unpack to do to generate our 4x32-bit RGBA values, so just sink that choice down below the pipe_get/put_tile API. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>