aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
Commit message (Collapse)AuthorAgeFilesLines
...
* i965/bufmgr: Add support for MMAP_OFFSET ioctl.Rafael Antognolli2020-04-201-1/+38
| | | | | | | | | | Use the new DRM_IOCTL_I915_GEM_MMAP_OFFSET ioctl when available. v2: update getparam check (Ken). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
* i965/bufmgr: Factor out GEM_MMAP ioctl from mmap_cpu and mmap_wc.Rafael Antognolli2020-04-201-26/+29
| | | | | | | | | | | | We want to add a new ioctl for mmap'ing buffers, so let's avoid duplicating that code on both functions by extracting it from them first. v2: Update helper function names (Ken). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
* Fix promotion of floats to doublesAlbert Astals Cid2020-04-181-1/+1
| | | | | | | | | Use the f variants of the math functions if the input parameter is a float, saves converting from float to double and running the double variant of the math function for gaining no precision at all Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3969>
* meson: Specify the maximum required libdrm in dri.pcMatt Turner2020-04-131-1/+1
| | | | | | | | | | | | | | | | When dealing with a regression in libdrm-2.4.101, I masked the package in Gentoo. In doing so, we discovered that Mesa's dri.pc specifies a version requirement in dri.pc for >= the version of libdrm Mesa was built against, thus preventing packages from being rebuilt with the older version of libdrm installed. Let's reduce this version requirement to the latest libdrm required by Mesa instead, since libdrm is backward compatible. Fixes: a3a16d4aa7e ("meson: use dep_libdrm version for pkg-config") Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4534>
* tnl: Silence unused parameter warnings in _tnl_draw_primsIan Romanick2020-04-131-17/+8
| | | | | | | | | | | | | | | A tangled mess of a couple parameters that nobody wanted. src/mesa/tnl/t_draw.c: In function ‘_tnl_draw_prims’: src/mesa/tnl/t_draw.c:440:42: warning: unused parameter ‘tfb_vertcount’ [-Wunused-parameter] 440 | struct gl_transform_feedback_object *tfb_vertcount, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ src/mesa/tnl/t_draw.c:441:35: warning: unused parameter ‘stream’ [-Wunused-parameter] 441 | unsigned stream) | ~~~~~~~~~^~~~~~ Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
* i965: share buffer managers across screensLionel Landwerlin2020-04-113-11/+93
| | | | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373 Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
* i965: store DRM fd on intel_screenLionel Landwerlin2020-04-115-19/+16
| | | | | | | | | | | v2: Fix storing of drm fd (Ajax) Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373 Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086>
* intel/compiler: Remove cs_prog_data->threadsCaio Marcelo de Oliveira Filho2020-04-091-3/+0
| | | | | | | | | | At this point all drivers are doing this math on their own -- since most of them need to cover the variable group size case, in which at compile time the group size (and number of threads) is not defined. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
* i965: Implement ARB_compute_variable_group_sizePlamena Manolova2020-04-098-8/+101
| | | | | | | | | | | | | This patch adds the implementation of ARB_compute_variable_group_size for i965. We do this by storing the local group size in a push constant. Additional changes made by Caio Marcelo de Oliveira Filho. Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
* intel/compiler: Replace cs_prog_data->push.total with a helperCaio Marcelo de Oliveira Filho2020-04-092-5/+8
| | | | | | | | | | | | | | | The push.total field had three values but only one was directly used (size). Replace it with a helper function that explicitly takes the cs_prog_data and the number of threads -- and use that in the drivers. This is a preparation for ARB_compute_variable_group_size where the number of threads (hence the total size for push constants) is not defined at compile time (not cs_prog_data->threads). Reviewed-by: Paulo Zanoni <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
* intel/fs: Allow multiple slots for positionCaio Marcelo de Oliveira Filho2020-04-073-3/+3
| | | | | | | | | | | | | | | | | | | | | | Change brw_compute_vue_map() to also take the number of pos slots. If more than one slot is used, the VARYING_SLOT_POS is treated as an array. When using Primitive Replication, instead of a single position, the VUE must contain an array of positions. Padding might be necessary (after clip distance) to ensure rest of attributes start aligned. v2: Add note about array in the commit message and assert that pos_slots >= 1 to make clear 0 is invalid. (Jason) Move padding to be after the clip distance. v3: Apply the correct offset when gathering the sources from outputs. Reviewed-by: Jason Ekstrand <[email protected]> [v2] Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2313>
* mesa: precompute _mesa_primitive_restart_index during state changesMarek Olšák2020-04-061-1/+1
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* mesa: remove no longer needed _mesa_is_bufferobj functionMarek Olšák2020-04-0612-29/+29
| | | | | | | | | | All buffers have Name != 0. Note that there is no longer the pointer dereference to get Name, so it's faster. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* mesa: don't ever bind NullBufferObj to glBindBuffer(Base,Range) slotsMarek Olšák2020-04-062-2/+2
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* mesa: don't ever set NullBufferObj in gl_vertex_array_bindingMarek Olšák2020-04-062-15/+23
| | | | | | | | | | This improves performance by 5% in the game "torcs", FPS: 98.83 -> 103.73 It does a lot of glPush/PopClientAttrib, which exacerbates the overhead of setting NullBufferObj. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* scons: Prune out unnecessary targets.Jose Fonseca2020-03-301-67/+0
| | | | | | | | | | | | | | | | This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
* intel: drop unused include directoriesEric Engestrom2020-03-281-2/+2
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* meson: inline `inc_common`Eric Engestrom2020-03-287-9/+9
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* mesa: don't use <> for including internal headersMarek Olšák2020-03-271-1/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-2754-54/+55
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* intel/perf: break GL query stuff awayLionel Landwerlin2020-03-272-0/+2
| | | | | | | | | | | | | | This stuff is somewhat specific to the GL extension & drivers. On Vulkan we won't use this, it also made a rather large file. v2: Fix Android build (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* intel/blorp: Add support for swizzling fast-clear colorsJason Ekstrand2020-03-181-0/+1
| | | | | | Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4218>
* intel/blorp: Plumb the stage through blorp upload_shaderCaio Marcelo de Oliveira Filho2020-03-171-1/+1
| | | | | | | | | | Vulkan uses that for its own upload function -- even though for BLORP it doesn't really currently care. Neither Iris and i965 makes use of it at the moment. Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4170> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4170>
* intel/compiler: detect if atomic load store operations are usedTapani Pälli2020-03-161-1/+1
| | | | | | | | | Patch adds a new arg and modifies existing calls from i965, anv pass NULL but iris stores this information for later use. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080>
* i965: Use gl_vertex_format in brw_vertex_element.Mathias Fröhlich2020-03-103-15/+13
| | | | | | | | | | | State upload needs to cope with the vertex format rather than with the full attribute data. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Make use of the vertex format functions in i965.Mathias Fröhlich2020-03-101-6/+4
| | | | | | | | | v2: Style fixes. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Remove glbinding from brw_vertex_element.Mathias Fröhlich2020-03-102-7/+0
| | | | | | | | v2: Rebase. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Reorder workaround flags computation.Mathias Fröhlich2020-03-101-26/+49
| | | | | | | | | | | | | | | Vertex processing workaround flags can be split into array and current vertex attributes. By that we can use specific access functions for these different vertex attribute kinds. This finally obsoletes some access functions that I introduced last winter for a smooth transition. v2: Style fixes. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Split merge_inputs and clear_buffers.Mathias Fröhlich2020-03-101-10/+23
| | | | | | | | | | | | | | The merge_inputs function handles that part that changes when the inputs change. The clear_buffers function triggers when we may need a new upload. Thus the merge_inputs can be limited to be once per brw_draw_prims. v2: Move declaration of attribute index into the for scope. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Test original vertex array pointer to skip array upload.Mathias Fröhlich2020-03-101-1/+1
| | | | | | | | | | Rather than do a NULL pointer check on a pointer that may be offset by the min-max index range of an GL draw operation, execute the NULL test on the original vertex array pointer. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Use the VAOs binding information in array setup.Mathias Fröhlich2020-03-101-181/+163
| | | | | | | | | | | | | | | | | | The change basically reimplements array setup by walking the gl_contex::Array._DrawVAO on a per binding sequence. In this way we can make direct use of the application provided minimum set of buffer objects and emit fewer relocs. v2: Rebase onto: compiler: Move double_inputs to gl_program::DualSlotInputs v3: Rebase onto introduction of gl_vertex_format v4: Reorder and extend patch series. v5: Split out two hunks into seperate patches. v6: Avoid using GL* types. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Use 32 bit u_bit_scan for vertex attribute setup.Mathias Fröhlich2020-03-101-7/+9
| | | | | | | | | | | | | | | The vertex array object contains 32 vertex arrays. By that we cannot reference more then these in the vertex shader inputs. So, we can use the 32 bits u_bit_scan function to iterate the vertex shader inputs and place an assert that only these are present. Also place an other assert that the vertex array setup in i965 does not overrun the enabled array in brw_context::vs::enabled. v2: Style fixes. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* i965: Move down genX_upload_sbe in profiles.Mathias Fröhlich2020-03-101-3/+3
| | | | | | | | | | | | | | | | | Avoid looping over all VARYING_SLOT_MAX urb_setup array entries from genX_upload_sbe. Prepare an array indirection to the active entries of urb_setup already in the compile step. On upload only walk the active arrays. v2: Use uint8_t to store the attribute numbers. v3: Change loop to build up the array indirection. v4: Rebase. v5: Style fix. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
* mesa: remove _mesa_index_buffer::index_size in favor of index_size_shiftMarek Olšák2020-03-045-14/+15
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Suggested-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
* 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: move num_instances and base_instance out of _mesa_primMarek Olšák2020-02-284-29/+48
| | | | | | | | 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-281-9/+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-283-15/+26
| | | | | | | Only i965 was using it. Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
* mesa: remove unused "indirect" parameter from Driver.DrawMarek Olšák2020-02-284-20/+12
| | | | | 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>
* 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>
* 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>
* 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>
* intel/bufmgr: Cast bitshift to unsignedDanylo Piliaiev2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ../src/mesa/drivers/dri/i965/intel_buffer_objects.c:405:4: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' #0 0x7f9404ac4ae1 in brw_map_buffer_range ../src/mesa/drivers/dri/i965/intel_buffer_objects.c:405 #1 0x7f9405a9cb13 in vbo_save_map_vertex_store ../src/mesa/vbo/vbo_save_api.c:261 #2 0x7f9405b6a89d in vbo_save_NewList ../src/mesa/vbo/vbo_save_api.c:1774 #3 0x7f94051aba3d in _mesa_NewList ../src/mesa/main/dlist.c:14172 ../src/gallium/drivers/iris/iris_resource.c:1725:61: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' #0 0x7fe51c820c8e in iris_map_direct ../src/gallium/drivers/iris/iris_resource.c:1725 #1 0x7fe51c82322c in iris_transfer_map ../src/gallium/drivers/iris/iris_resource.c:1895 #2 0x7fe5202628be in u_transfer_helper_transfer_map ../src/gallium/auxiliary/util/u_transfer_helper.c:243 #3 0x7fe51997c508 in pipe_buffer_map_range ../src/gallium/auxiliary/util/u_inlines.h:344 #4 0x7fe51997ec8d in u_upload_alloc_buffer ../src/gallium/auxiliary/util/u_upload_mgr.c:221 #5 0x7fe51997f24f in u_upload_alloc ../src/gallium/auxiliary/util/u_upload_mgr.c:254 #6 0x7fe51ccf43af in upload_state ../src/gallium/drivers/iris/iris_state.c:323 #7 0x7fe51d06963a in gen9_init_state ../src/gallium/drivers/iris/iris_state.c:7516 #8 0x7fe51c7c2ea0 in iris_create_context ../src/gallium/drivers/iris/iris_context.c:294 #9 0x7fe519dc729b in st_api_create_context ../src/mesa/state_tracker/st_manager.c:921 #10 0x7fe5198c47ea in dri_create_context ../src/gallium/state_trackers/dri/dri_context.c:161 #11 0x7fe519898aac in driCreateContextAttribs ../src/mesa/drivers/dri/common/dri_util.c:475 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3825>
* 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>
* í965: don't use _mesa_prim::is_indirectMarek Olšák2020-02-111-7/+7
| | | | | | | 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-117-9/+6
| | | | | 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-111-1/+0
| | | | | | | no change in behavior 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>