summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/cnl: Define genX(x) and GENX(x) for gen10Anuj Phogat2017-06-091-0/+3
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/genxml: Add gen10.xmlJason Ekstrand2017-06-091-0/+3562
| | | | | | | | | | | | | | V2(Anuj): Add default value for length of 3DPRIMITIVE command Add values for 'Attribute Active Component Format' Rename few fields to match gen9.xml V3 (Ander Conselvan de Oliveira) Add gen10 alias for MOCS Make 3DSTATE_CONSTANT_BODY on Gen10 use arrays Signed-off-by: Anuj Phogat <[email protected]> Tested-by: Anuj Phogat <[email protected]>
* i965: Make feature macros gen8 basedBen Widawsky2017-06-091-8/+5
| | | | | | | | | | All the "features" of the hardware are similar starting with GEN8, so remove as much of the GEN9 uniqueness as possible. This makes implementing future gen platforms a bit easier. Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: set fmask state to all 0s when no fmask. (v2)Dave Airlie2017-06-091-1/+2
| | | | | | | | | | | | | | | The shader reads the descriptor to decide if it should take the fmask value, however we weren't initing it always, which meant random crap, esp with MSAA depth textures. Fixes random hangs with: dEQP-VK.glsl.builtin_var.fragdepth.* v2: check fmask_state is not NULL Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965: Temporarily disable async mappings on non-LLCMatt Turner2017-06-091-2/+2
| | | | | | | | | | | | | | Fixes regressions from commits e0a9b261e593 and a16355d67d92 by neutering async mappings on non-LLC to be synchronous, like they were before those two commits. :( The failing tests include piglit-test piglit.spec.nv_primitive_restart.primitive-restart-vbo_index_only piglit-test piglit.spec.nv_primitive_restart.primitive-restart-vbo_combined_vertex_and_index piglit-test piglit.spec.nv_primitive_restart.primitive-restart-vbo_separate_vertex_and_index piglit-test piglit.spec.nv_primitive_restart.primitive-restart-vbo_vertex_only piglit-test piglit.spec.arb_pixel_buffer_object.texsubimage-unpack pbo
* mesa/main/debug: Check if we successfully reopened the ppm file.Rafael Antognolli2017-06-091-0/+5
| | | | | | | | | | Since we created the file, we should be able to reopen it for appending, but some weird filesystem error could cause that to be false. So simply check whether we could reopen it or not. CID: 1177144 Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* tgsi: clarify TGSI_SEMANTIC_SAMPLEMASK documentationBrian Paul2017-06-091-2/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/wgl: Allow context creation even if SetPixelFormat() wasn't calledFrank Richter2017-06-091-1/+7
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101326 Reviewed-by: Brian Paul <[email protected]>
* st/dri: support format modifier queriesVarad Gautam2017-06-091-1/+23
| | | | | | | | | | | | | | ask the driver for supported modifiers for a given format. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. v5: - move to __DRIimageExtension v15, pass external_only to the driver. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v4) Cc: Lucas Stach <[email protected]>
* gallium: introduce format modifier queryingVarad Gautam2017-06-091-0/+14
| | | | | | | | | | | | | | | | | format modifiers tokens are driver specific, and hence, need to come in from the driver. this allows drivers to be queried for supported format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: drivers must return false on query failure. v4: use pscreen->is_format_supported instead of adding a separate format query handle, remove PIPE_CAP_QUERY_DMABUF_ATTRIBS. (Lucas Stach) v5: add external_only parameter. Signed-off-by: Varad Gautam <[email protected]> Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* st/dri: support format queriesVarad Gautam2017-06-091-0/+118
| | | | | | | | | | | | | | | ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. v4: use pscreen->is_format_supported instead of adding a new query. (Lucas Stach) v5: stylefix to conform to formatting rules (Brian Paul). add fourcc list here instead of using struct image_format from v4. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v4) Cc: Lucas Stach <[email protected]>
* st/dri: implement DRIimage creation from dmabufs with modifiersVarad Gautam2017-06-091-5/+40
| | | | | | | | | | | support importing dmabufs into DRIimage while taking format modifiers in account, as per DRIimage extension version 15. v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) v3: do not bump DRIimageExtension version. split out winsys changes. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* st/dri: implement createImageWithModifiers in DRIimageVarad Gautam2017-06-092-5/+68
| | | | | | | | | | | | | | | adds a pscreen->resource_create_with_modifiers() to create textures with modifier. v2: - stylefixes (Emil Velikov) - don't return selected modifier from resource_create_with_modifiers. we can use the winsys_handle to get this. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v1) Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* st/dri: enable DRIimage modifier queriesVarad Gautam2017-06-091-0/+12
| | | | | | | | | | | | | | return the modifier selected by the driver when creating this image. v2: since we can use winsys_handle->modifier to serve these, remove DRIimage->modifier from v1. use DRM_API_HANDLE_TYPE_KMS instead of DRM_API_HANDLE_TYPE_FD to avoid ownership transfer. (Lucas) Suggested-by: Daniel Stone <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* gallium/winsys/drm: introduce modifier field to winsys_handleVarad Gautam2017-06-092-0/+13
| | | | | | | | | we use this to import resources with format modifiers, and to support per-resource modifier queries. Signed-off-by: Varad Gautam <[email protected]> Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* mesa: make use of NewScissorTest driver flagsSamuel Pitoiset2017-06-092-3/+3
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: make use of NewScissorRect driver flagsSamuel Pitoiset2017-06-092-2/+4
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add gl_driver_flags::NewScissor{Rect,Test}Samuel Pitoiset2017-06-091-0/+6
| | | | | | | | | | | | | | | | | _NEW_SCISSOR mesa flag is set when a scissor test is enabled/disabled or when a new rectangle is defined. However, it triggers too much changes in the state tracker. Actually, ST_NEW_RASTERIZER should only be called when a scissor test is enabled/disabled, while ST_NEW_SCISSOR should be called in both situations. In other words, this will avoid to update the rasterizer every time a new rectangle is defined using glScissor*(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: fix _eglQuerySurface in EGL_BUFFER_AGE_EXT caseTapani Pälli2017-06-094-5/+9
| | | | | | | | | | | | | | | | | | Specification states that in case of error, value should not be written, patch changes buffer age queries to return -1 in case of error so that we can skip changing the value. In addition, small change to droid_query_buffer_age to return 0 in case buffer does not have a back buffer available. Fixes: dEQP-EGL.functional.negative_partial_update.not_postable_surface Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: [email protected]
* radv: introduce perf test env var and allow to enable chainingDave Airlie2017-06-097-4/+20
| | | | | | | | | | | | | We have some features that seem to slow things down or cause other possible undesireable side effects, but it would be nice to test games etc with them easily. I forsee multisample DCC and maybe some shader opt changes using this. For now use it for batch chaining. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add KHR_no_error support to glDrawRangeElements*()Timothy Arceri2017-06-091-3/+10
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: rework _ae_invalidate_state() so that it just sets a dirty flagTimothy Arceri2017-06-093-18/+19
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: remove redundant _ae_invalidate_state() callTimothy Arceri2017-06-091-3/+0
| | | | | | | | | The FLUSH_VERTICES(ctx, _NEW_ARRAY) above this will already cause this to be called. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: inline vbo_exec_invalidate_state() and call from mesa coreTimothy Arceri2017-06-0916-45/+22
| | | | | | | | Rather than calling it indirectly in each driver. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: rework vbo_exec_init()Timothy Arceri2017-06-093-8/+18
| | | | | | | | | | Here we make some assumptions about the AEcontext and set the recalculate bools directly. Some formating fixes are also made while we are here. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: stop passing state bitfield to UpdateState()Timothy Arceri2017-06-0913-22/+33
| | | | | | | | | | | | | | | | | | The code comment which seems to have been added in cab974cf6c2db (from year 2000) says: "Set ctx->NewState to zero to avoid recursion if Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)" As far as I can tell nothing in any of the UpdateState() calls should cause it to be called recursively. V2: add a wrapper around the osmesa update function so it can still be used internally. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add st_invalidate_buffers() helperTimothy Arceri2017-06-094-16/+26
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* r200/radeon: stop calling _ae_invalidate_state() directlyTimothy Arceri2017-06-092-4/+0
| | | | | | | It is already called via _vbo_InvalidateState(). Reviewed-by: Marek Olšák <[email protected]> Tested-by: Ian Romanick <[email protected]>
* swr: relax c++ requirement from c++14 to c++11Tim Rowley2017-06-084-20/+21
| | | | | | | | | | | Remove c++14 generic lambda to keep compiler requirement at c++11. No regressions on piglit or vtk test suites. Tested-by: Chuck Atkins <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]> CC: [email protected]
* radeonsi: call LLVMAddEarlyCSEMemSSAPass only for LLVM >= 4.0Juan A. Suarez Romero2017-06-081-0/+2
| | | | | | | | LLVMAddEarlyCSEMemSSAPass() is defined in LLVM 4.0. Fixes: 257b538 ("radeonsi: do EarlyCSEMemSSA LLVM pass) Signed-off-by: Marek Olšák <[email protected]>
* gallium/radeon: don't allocate HTILE in a separate bufferMarek Olšák2017-06-088-59/+41
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rename depth decompress functionsMarek Olšák2017-06-081-16/+15
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rename shader resource decompress masks to their true meaningMarek Olšák2017-06-083-28/+28
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rename is_compressed_colortex -> color_needs_decompressionMarek Olšák2017-06-081-5/+5
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: disable the patch ID workaround on SI when the patch ID isn't used ↵Marek Olšák2017-06-082-15/+21
| | | | | | | | | | | | | | (v2) The workaround causes a massive performance decrease on 1-SE parts. (Cape Verde, Hainan, Oland) The performance regression is already part of 17.0 and 17.1. v2: check tess_uses_prim_id Cc: 17.0 17.1 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't update dependent states if it has no effect (v2)Marek Olšák2017-06-083-12/+76
| | | | | | | | | | | | | | This and the previous clip_regs commit decrease IB sizes and the number of si_update_shaders invocations as follows: IB size si_update_shaders calls Borderlands 2 -10% -27% Deus Ex: MD -5% -11% Talos Principle -8% -30% v2: always dirty cb_render_state in set_framebuffer_state Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: Add format/modifier advertisingVarad Gautam2017-06-081-4/+72
| | | | | | | | | v2: Rebase and reuse tiling/modifier map. (Daniel Stone) v3: bump DRIimageExtension to version 15, fill external_only array. v4: Y-tiling works since gen 6 Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Support dmabuf import with modifiersVarad Gautam2017-06-081-18/+76
| | | | | | | | | | | | Add support for createImageFromDmaBufs2, adding a modifier to the original, and allow importing CCS resources with auxiliary data from dmabufs. v2: avoid DRIimageExtension version bump, pass single modifier to createImageFromDmaBufs2. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Improve same-buffer restriction for importsDaniel Stone2017-06-081-5/+13
| | | | | | | | | | | | | | | | Intel hardware requires that all planes of an image come from the same buffer, which is currently implemented by testing that all FDs are numerically the same. However, when going through a winsys (e.g.) or anything which transits FDs individually, the FDs may be different even if the underlying buffer is the same. Instead of checking the FDs for equality, we must check if they actually point to the same buffer (Jason). Reviewed-by: Varad Gautam <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Allocate tile aligned heightBen Widawsky2017-06-081-5/+26
| | | | | | | | | | | | | | | This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm or kernel does something incorrectly. v2: Do proper alignment for X tiling, and make sure non-tiled case is handled (Jason) v3: Rebase (Daniel) Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Move fallback size assignment out of bufmgrDaniel Stone2017-06-083-9/+17
| | | | | | | | | | | | | | The bufmgr took a mandatory size argument, which would only be used if the kernel size query failed, i.e. an older kernel. It didn't actually check that the BO size was sufficient for use. Pull the check out of the bufmgr, and actually check that the BO is sufficiently-sized for our import one level up. This also resolves a chicken/egg we have when importing bufers without explicit modifiers, namely that we need the tiling mode to calculate the size, but we need the BO imported to query the tiling mode. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Invert image modifier/tiling inferenceDaniel Stone2017-06-081-17/+18
| | | | | | | | | | | | When allocating images, we record a tiling mode and then work backwards to infer the modifier. Unfortunately this is the wrong way around, since it is a one:many mapping (e.g. TILING_Y can be plain Y-tiling, or Y-tiling with CCS). Invert the mapping, so we record a modifier first and then map this to a tiling mode. Reviewed-by: Jason Ekstrand <[email protected]>
* egl/dri2: Avoid sign extension when building modifierDaniel Stone2017-06-081-3/+2
| | | | | | | | | Since the EGL attributes are signed integers, a straight OR would also perform sign extension, Fixes: 6f10e7c37a ("egl/dri2: Create EGLImages with dmabuf modifiers") Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i915g: Add blitter_context argument.Vinson Lee2017-06-081-1/+1
| | | | | | | | | | | | | | | | | | | Fix build error. CC i915_surface.lo i915_surface.c:108:63: error: too few arguments to function call, expected 4, have 3 util_blitter_default_src_texture(&src_templ, src, src_level); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ../../../../src/gallium/auxiliary/util/u_blitter.h:271:1: note: 'util_blitter_default_src_texture' declared here void util_blitter_default_src_texture(struct blitter_context *blitter, ^ Fixes: a893c9169733 ("gallium/u_blitter: use 2D_ARRAY for cubemap blits if possible") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101340 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: flush resource when binding as sampler viewLucas Stach2017-06-081-0/+3
| | | | | | | | As TS is also allowed on sampler resources, we need to make sure to resolve to self when binding the resource as a texture, to avoid stale content being sampled. Signed-off-by: Lucas Stach <[email protected]>
* etnaviv: don't flush resource to self without TSLucas Stach2017-06-081-1/+1
| | | | | | | | A resolve to self is only necessary if the resource is fast cleared, so there is never a need to do so if there is no TS allocated. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: upgrade DISCARD_RANGE to DISCARD_WHOLE_RESOURCE if possibleLucas Stach2017-06-081-0/+14
| | | | | | | | Stolen from VC4. As we don't do any fancy reallocation tricks yet, it's possible to upgrade also coherent mappings and shared resources. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: simplify transfer tiling handlingLucas Stach2017-06-081-41/+29
| | | | | | | | | There is no need to special case compressed resources, as they are already marked as linear on allocation. With that out of the way, there is room to cut down on the number of if clauses used. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: don't read back resource if transfer discards contentsLucas Stach2017-06-081-1/+3
| | | | | | | | | Reduces bandwidth usage of transfers which discard the buffer contents, as well as skipping unnecessary command stream flushes and CPU/GPU synchronization. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flagLucas Stach2017-06-081-12/+23
| | | | | | | | | | | | This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer uploads and I haven't seen any of the issues mentioned in the comment, so this one seems stale. Ignore the flag if there exists a temporary resource, as those ones are never busy. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>