summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Print access flags in INTEL_DEBUG=buf output.Kenneth Graunke2017-07-011-3/+22
| | | | | | | | | | | | | | | | | Being able to see the access mode of various mappings is incredibly useful for debugging. With this patch, INTEL_DEBUG=buf now shows data such as: bo_create: buf 7 (bufferobj) 640b bo_map_gtt: 7 (bufferobj) -> 0x7fca1fae5000, WRITE ASYNC brw_bo_map_cpu: 7 (bufferobj) -> 0x7fca1fae4000, READ bo_map_gtt: 5 (bufferobj) -> 0x7fca1fad4000, WRITE ASYNC brw_bo_map_cpu: 7 (bufferobj) -> 0x7fca1fae4000, READ which makes it easy to see that there are async GTT writes with intervening CPU reads. Reviewed-by: Matt Turner <[email protected]>
* i965: Remove clearing of bo->map_gtt after failureChris Wilson2017-07-011-1/+0
| | | | | | | | | | | | With the conversion to storing the result of drm_mmap to a local and not directly to bo->map_gtt itself, we no longer should clear bo->map_gtt. In the best the operation is redundant as we know bo->map_gtt to already be NULL, but in the worst case we overwrite a concurrent thread that successfully mmaped the GTT. Fixes: 314647c4c206 ("i965: Drop global bufmgr lock from brw_bo_map_* functions.") Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add inline to brw_bo_unmapKenneth Graunke2017-06-301-1/+1
| | | | | I meant to do this in "i965: Make brw_bo_unmap a static inline." but botched the commit fixup.
* i965: Drop global bufmgr lock from brw_bo_map_* functions.Chris Wilson2017-06-301-14/+15
| | | | | | | | | | | | After removing the unusuable debugging code in the previous commit, we can also entirely remove the global mutex around mapping the buffer for the first time and replace it with a single atomic operation to update the cache once we retrieve the mmap. v2 (Ken): Split out from Chris's original commit. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Make brw_bo_unmap a static inline.Kenneth Graunke2017-06-302-7/+1
| | | | | | | | | | | With the broken debugging code gone, it doesn't do anything anymore. We could technically eliminate it, but I'd like to keep it around in case we want to add something there again someday. Otherwise we'd have to go all over the codebase adding unmap calls back again. Based on a patch by Chris Wilson. Reviewed-by: Matt Turner <[email protected]>
* i965: Discard bo->map_countChris Wilson2017-06-302-53/+3
| | | | | | | | | | | | | | | Supposedly we were keeping a reference count for the number of users of a mapping so that we could use valgrind to detect access to the map outside of the valid section. However, we were incrementing the counter only when first creating the cached mapping but decrementing on every unmap. The bo->map_count tracking was wrong and so the debugging code was completely useless. v2 (Ken): Separate out atomic compare and swap optimization. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Add a comment about not needing VALGRIND_MALLOCLIKE_BLOCK.Kenneth Graunke2017-06-301-1/+3
| | | | | | | | | At first glance this seems missing, since we handle it manually for CPU and WC maps. Although a bit inconsistent, it's actually not necessary. Thanks to Chris Wilson for explaining this to me. Reviewed-by: Matt Turner <[email protected]>
* radv: Use v4i32 variant of llvm.SI.load.const.Bas Nieuwenhuizen2017-06-301-3/+1
| | | | | | | | | | We apparently still used v16i8 .... As radeonsi doesn't use it with LLVM version checks I don't think we need them either. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* svga: add texture size/levels sanity check code in svga_texture_create()Brian Paul2017-06-301-0/+33
| | | | | | | | | The state tracker should never ask us to create a texture with invalid dimensions / mipmap levels. Do some assertions to check that. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: fix texture image resource selection in st_render_texture()Brian Paul2017-06-301-1/+18
| | | | | | | | | | | | | | If we're rendering to an incomplete/inconsistent (cube) texture, the different faces/levels of the texture may be stored in different resources. Before, we always used the texture object resource. Now, we use the texture image resource. In normal circumstances, that's the same resource. But in some cases, such as the Piglit fbo-incomplete-texture-03 test, the cube faces are in different resources and we need to render to the texture image resource. Fixes fbo-incomplete-texture-03 with VMware driver. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: check for incomplete texture in st_finalize_texture()Brian Paul2017-06-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | Return early from st_finalize_texture() if we have an incomplete texture. This avoids trying to create a texture resource with invalid parameters (too many mipmap levels given the base dimension). Specifically, the Piglit fbo-incomplete-texture-03 test winds up calling pipe_screen::resource_create() with width0=32, height0=32 and last_level=6 because the first five cube faces are 32x32 but the sixth face is 64x64. Some drivers handle this, but others (like VMware svga) do not (generates device errors). Note that this code is on the path that's usually not taken (we normally build consistent textures). No Piglit regressions. v2: only need to check for base-level completeness since that's what has to be consistent in order to specify the dimensions for a new gallium texture. Per Roland. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: document that TXF is used with PIPE_BUFFER resourcesBrian Paul2017-06-301-1/+2
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/docs: clarify that samplers are not used with PIPE_BUFFER resourcesBrian Paul2017-06-301-0/+8
| | | | | | | | Commit 8aba778fa2cd98a0b5a7429d3c5057778a0c808c "st/mesa: don't set sampler states for TBOs" changed how texture buffer objects are handled. Document the new convention. Reviewed-by: Roland Scheidegger <[email protected]>
* vc4: Start using XML unpack functions in CL dump.Eric Anholt2017-06-305-19/+67
| | | | | | For now this is a no-op on the output, but it makes it clear that we've had weird things going on with things like V3D21_CLIPPER_Z_SCALE_AND_OFFSET.
* vc4: Replace a couple of magic numbers with #define usage.Eric Anholt2017-06-301-2/+2
|
* vc4: Move rasterizer state packing to CSO creation time.Eric Anholt2017-06-304-29/+25
| | | | | | | | | | This gets our vc4_emit.c size back down a bit: before: 1020 0 0 1020 3fc src/gallium/drivers/vc4/.libs/vc4_emit.o after: 968 0 0 968 3c8 src/gallium/drivers/vc4/.libs/vc4_emit.o
* vc4: Convert the driver to emitting the shader record using pack macros.Eric Anholt2017-06-304-54/+100
|
* vc4: Simplify pack header usageEric Anholt2017-06-304-35/+28
| | | | | | | | | | | | | Take the CL pointer in, which will be useful for enabling relocs. However, our code expands a bit more: before: 4449 0 0 4449 1161 src/gallium/drivers/vc4/.libs/vc4_draw.o 988 0 0 988 3dc src/gallium/drivers/vc4/.libs/vc4_emit.o after: 4481 0 0 4481 1181 src/gallium/drivers/vc4/.libs/vc4_draw.o 1020 0 0 1020 3fc src/gallium/drivers/vc4/.libs/vc4_emit.o
* vc4: Start using the pack header.Eric Anholt2017-06-304-51/+130
| | | | | | | | | | | | | This slightly inflates the size of the generated code, in exchange for getting us some convenient tools. before: 4389 0 0 4389 1125 src/gallium/drivers/vc4/.libs/vc4_draw.o 808 0 0 808 328 src/gallium/drivers/vc4/.libs/vc4_emit.o after: 4449 0 0 4449 1161 src/gallium/drivers/vc4/.libs/vc4_draw.o 988 0 0 988 3dc src/gallium/drivers/vc4/.libs/vc4_emit.o
* vc4: Introduce XML-based packet header generation like Intel's.Eric Anholt2017-06-3011-1/+1141
| | | | | | | | | | | | | | | I really liked this idea, as it should help with management of packet parsing tools like the CL dump. The python script is forked off of theirs because our packets are byte-based instead of dwords, and the changes to do so while avoiding performance regressions due to unaligned accesses were quite invasive. v2: Fix Android.mk paths, drop shebang for python script, fix overlap detection. Acked-by: Jason Ekstrand <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Tested-by: Rob Herring <[email protected]>
* swr: Minor cleanup of variable usage, no functional change.Bruce Cherniak2017-06-301-2/+2
| | | | | | | | | | In swr_update_derived, for consistency, index buffer validation should be using the p_draw_info copy "info" rather than referencing p_draw_info. No functional change. Reviewed-by: Tim Rowley <[email protected]>
* swr: use swr_query_result type instead of voidTim Rowley2017-06-302-3/+3
| | | | | | | | | Tag pStat field in swr_draw_context structure so gen_llvm_types.py can deal with the actual structure type instead of using void. Code cleanup, no functional change. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: increase number of possible draws in flightTim Rowley2017-06-301-1/+1
| | | | | | Increases performance of some large workloads on KNL by ~30%. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: move default split size from driver to rasterizerTim Rowley2017-06-302-5/+1
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Fix missing setup of psContext.pColorBufferTim Rowley2017-06-302-16/+14
| | | | | | Fixes render target read access from pixel shaders. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Switch intrinsic usage to SIMDLibTim Rowley2017-06-3030-2679/+6222
| | | | | | | | Switch from a macro-based simd intrinsics layer to a more C++ implementation, which also adds AVX512 optimizations to 128-bit and 256-bit SIMD. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Fix unused variable warningsTim Rowley2017-06-301-6/+0
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Split rasterizer.cpp to improve compile timeTim Rowley2017-06-3010-1617/+1732
| | | | | | | Hardcode split to four files currently. Decreases swr build time on KNL by over 50%. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: gen_backends.py remove extraneous semicolonTim Rowley2017-06-301-1/+2
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Support dynamically sized vertex layoutTim Rowley2017-06-306-21/+49
| | | | | | | | | | | | | | | Each shader stage state (VS, TS, GS, SO, BE/CLIP) now has a vertexAttribOffset to specify the offset to the start of the general attribute section of the incoming verts for that stage. It is up to the driver to set this up correctly based on the active stages. All the shader stages use this value instead of VERTEX_ATTRIB_START_SLOT to offset to the incoming attributes. Only the vertex shader stage supports dynamic layout output currently. The other stages continue to expect the output to be the fixed layout slots as before. Will be enabling GS next. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: Split backend.cpp to improve compile timeTim Rowley2017-06-3013-1832/+2146
| | | | | | | Hardcode split to four files currently. Decreases swr build time on a quad-core by ~10%. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: gen_backends.py removal of commented debug printsTim Rowley2017-06-301-4/+1
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: gen_backends.py quote cleanupTim Rowley2017-06-301-8/+8
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* swr/rast: generators will create target directoriesTim Rowley2017-06-301-0/+7
| | | | Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
* Android: fix typo in symlink for driver loading and 32 bit buildsMauro Rossi2017-06-301-2/+2
| | | | | | | | | | | | There is typo in the mkdir command path, the correct one is $(TARGET_OUT)/$(l)/$(MESA_DRI_MODULE_REL_PATH) The other issue is in 32bit builds, because lib64 does not exist there, we can use TARGET_IS_64_BIT to refine the post install command. Fixes: a3d98ca62f ("Android: use symlinks for driver loading") Signed-off-by: Rob Herring <[email protected]>
* svga: update a few surface format namesBrian Paul2017-06-303-24/+24
| | | | | | To sync with in-house changes. Reviewed-by: Neha Bhende <[email protected]>
* svga: whitespace fixes in svga_resource_buffer_upload.cBrian Paul2017-06-301-15/+14
| | | | Trivial.
* svga: add mksstats for surface view emulationCharmaine Lee2017-06-301-10/+17
| | | | | | | Add mksstats for surface view emulation and also tighten the stat CreateBackedView for the actual creation of backed view. Reviewed-by: Brian Paul <[email protected]>
* svga: change error handling convention for svga_set_stream_output()Brian Paul2017-06-303-12/+18
| | | | | | | | | | | | | | | | | | In general, the functions which emit commands to the command buffer check for failure and return a PIPE_ERROR_x code. It's up to the caller to flush the buffer and retry the command. But svga_set_stream_output() did its own flushing and the callers never checked the return value (though, it would always be PIPE_OK) in practice. This patch changes svga_set_stream_output() so that it does not call svga_context_flush() when the buffer is full. And we update the callers to check the return value as we do for other functions, like svga_set_shader(). No Piglit regressions. Also tested w/ Nature demo. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fixed surface size to include array sizeCharmaine Lee2017-06-301-1/+2
| | | | | | | | | This patch fixes the total surface size in surface cache to include array size as well. Tested with MTT glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: loop over box.depth for ReadBack_image on each sliceNeha Bhende2017-06-301-7/+8
| | | | | | | | piglit test ext_texture_array-gen-mipmap is fixed with this patch. Tested with mtt piglit, glretrace, viewperf and conform. No regression. Reviewed-by: Brian Paul <[email protected]>
* svga: add mksstats for context creationCharmaine Lee2017-06-301-2/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* svga: re-validate sampler view at draw time if neededCharmaine Lee2017-06-304-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch validates those sampler views with backing copy of texture whose original copy has been updated since the view is last validated. This is done here at draw time because the texture binding might not have modified, hence validation is not triggered at state update time, and yet the texture might have been updated in another context, so we need to re-validate the sampler view in order to update the backing copy of the updated texture. This fixes a rendering flickering issue with Photoshop running in Linux VM with HWversion 11. The problem is Photoshop renders to texture A in context X, and then bind texture A to context Y. The first time when texture A is bound to context Y, cso calls pipe->set_sampler_views(). Validation of sampler views is done, rendering is fine. But when texture A is rendered to again in context X, and rebound in context Y, cso skips pipe->set_sampler_views() because texture A is already bound in context Y. SVGA driver is not given a chance to re-validate the texture binding, the backing copy of the texture is not updated, and hence causes black image. Tested with Photoshop, MTT glretrace, piglit. Fixes VMware bug 1769103. Reviewed-by: Jose Fonseca <[email protected]>
* Update Khronos-supplied headersNicolai Hähnle2017-06-301-587/+1573
| | | | | | | | | | | Taken from commit 676834dd529d620ee25090e738d2607dfde003d8 of https://github.com/KhronosGroup/OpenGL-Registry.git v2: - keep the BUILDING_MESA bits (Matt) Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965/i915: Add UYVY as the supported formatJohnson Lin2017-06-305-18/+33
| | | | | | Trigger the correct sampler options for it. Similar with YUYV Reviewed-by: Kristian H. Kristensen <[email protected]>
* nir: Add a lowering pass for UYVY texturesJohnson Lin2017-06-302-0/+19
| | | | | | Similar with support for YUYV but with byte order difference in sampler Reviewed-by: Kristian H. Kristensen <[email protected]>
* gbm: add XBGR8888 support for dumb buffersRob Herring2017-06-301-1/+1
| | | | | | | | | Add GBM_FORMAT_XBGR8888 format support which is needed for Android. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: os_process fixes for AndroidRob Herring2017-06-301-2/+2
| | | | | | | | | The function getprogname() is available on Android, since it reuses various BSD solutions C runtime. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* etnaviv: Add unreachable statement to etna_amode to fix compilation warningsTomeu Vizoso2017-06-301-0/+2
| | | | | | Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* swr: Remove need to allocate vertex buffer scratch space all in one gocros-mesa-17.1.1-r14-vanillachadv/cros-mesa-17.1.1-r14-vanillaBruce Cherniak2017-06-291-23/+2
| | | | | | | | Deferred deletion (via "fence_work") has obsoleted the need to allocate all client vertex buffer scratch space in a single chunk. Scratch allocations are now valid until the referenced fence is complete. Reviewed-by: Tim Rowley <[email protected]>