summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir/lower_io_to_temporaries: don't set compact on shadow varsConnor Abbott2017-07-131-0/+1
| | | | | | | | | The compact flag doesn't make sense on local variables, since the packing on them is up to the driver. This fixes nir_validate assertions in some cases, particularly when lower_io_to_temporaries is used on per-vertex inputs/outputs. Reviewed-by: Jason Ekstrand <[email protected]>
* nir: don't segfault when printing variables with no nameConnor Abbott2017-07-131-1/+1
| | | | | | | | | | | | While normally we give variables whose name field is NULL a temporary name when called from nir_print_shader(), when we were calling from nir_print_instr() we never bothered, meaning that we just segfaulted when trying to print out instructions with such a variable. Since nir_print_instr() is meant to be called while debugging, we don't need to bother too much about giving a consistent name, but we don't want to crash in the middle of debugging. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* i965/urb: Trigger upload_urb on NEW_BLORPJason Ekstrand2017-07-132-3/+2
| | | | | | | | | | | | | | | It's a bit rare, but blorp can trigger a urb reconfiguration. When that happens, we need to re-upload the URB config. Previoulsy blorp would set BRW_NEW_URB_SIZE, but this is a pretty big hammer as it would cause back-to-black blorp operations to reconfigure both times. Using BRW_NEW_BLORP is a small, more accurate hammer. v2 (idr): Sort BRW_NEW_ tokens to match brw_recalculate_urb_fence and gen6_urb. v3 (idr): Don't whack BRW_NEW_URB_SIZE in blorp. Suggested by Jason. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Return GL_INVALID_ENUM for bogus TEXTURE_SRGB_DECODE_EXT params.Kenneth Graunke2017-07-131-1/+12
| | | | | | | Fixes dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.srgb_decode_samplerparameter{f,fv,i,Iiv,Iuiv,iv}. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* st/dri: add 32-bit RGBX/RGBA formatsMarek Olšák2017-07-132-12/+65
| | | | | | | | | | | | | | | | | | Add support for 32-bit RGBX/RGBA formats which are required for Android. The original patch (commit ccdcf91104a5) was reverted (commit c0c6ca40a25e) in mesa as it broke GLX resulting in swapped colors. Based on further investigation by Chad Versace, moving the RGBX/RGBA configs to the end is enough to prevent breaking GLX. The handling of RGBA/RGBX in dri_fill_st_visual is a fix from Marek Olšák. Cc: Eric Anholt <[email protected]> Cc: Mauro Rossi <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* broadcom/vc4: Add more packets to the v2.1 XML.Eric Anholt2017-07-131-0/+106
| | | | These will be used to replace vc4_cl_dump.c's hand-written dumping.
* broadcom: Introduce a header for talking about chip revisions.Eric Anholt2017-07-132-0/+40
| | | | | This will be used by the VC5 driver and various shared VC4/VC5 tooling, like the XML decoder.
* broadcom/genxml: Use the same "gen" attr for HW version as Intel does.Eric Anholt2017-07-132-3/+3
| | | | This will let us reuse their tools more easily.
* broadcom/genxml: Support unpacking fixed-point fractional values.Eric Anholt2017-07-132-4/+25
| | | | | This was an oversight in the original XML support, because unpacking wasn't used much. The new XML-based CL dumper will want it, though.
* st/mesa: Handle st_framebuffer_create returning NULLMichel Dänzer2017-07-131-3/+5
| | | | | | | | | | | | | st_framebuffer_create returns NULL if stfbi == NULL or st_framebuffer_add_renderbuffer returns false for the colour buffer. Fixes Xorg crashing on startup using glamor on radeonsi. Fixes: 147d7fb772a7 ("st/mesa: add a winsys buffers list in st_context") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101775 Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swr/rast: Fix use of KNL-only intrinsics in SKX buildTim Rowley2017-07-133-6/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Fix build warnings when using the Intel compilerTim Rowley2017-07-131-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 Frontend - Fix USE_SIMD16_FRONTEND buildTim Rowley2017-07-134-12/+25
| | | | | | | Previous check-ins without testing with USE_SIMD16_FRONTEND have introduced regressions. This fixes the build, not the regressions. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Removing unneeded MSVC warning pragmaTim Rowley2017-07-131-3/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add support for read-only render targetsTim Rowley2017-07-132-4/+10
| | | | | | | Core will ensure hot tiles are loaded for read and write render targets, and will skip all output merger for read-only render targets. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Support render target mask instead of render target countTim Rowley2017-07-137-49/+85
| | | | | | WIP to support read-only render targets. Reviewed-by: Bruce Cherniak <[email protected]>
* egl: remove unused err variableAlejandro Piñeiro2017-07-131-1/+1
| | | | | | Fixes: 81e95924ea1 ("egl: call _eglError within _eglParseImageAttribList") Reviewed-by: Daniel Stone <[email protected]>
* radeonsi/gfx9: fix crash building monolithic merged ES-GS shaderNicolai Hähnle2017-07-131-3/+6
| | | | | | | | | | | Forwarding from the ES prolog to the ES just barely exceeds the current maximum array size when 16 vertex attributes are used. Give it a decent bump to account for merged shaders having up to 32 user SGPRs. Fixes a crash in GL45-CTS.multi_bind.draw_bind_vertex_buffers. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* loader/dri3: Use dri3_find_back in loader_dri3_swap_buffers_mscThomas Hellstrom2017-07-131-1/+1
| | | | | | | | | | | | | | | | If the application hasn't done any drawing since the last call, we would reuse the same back buffer which was used for the previous swap, which may not have completed yet. This could result in various issues such as tearing or application hangs. In the normal case, the behaviour is unchanged. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97957 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101683 Cc: [email protected] [Michel Dänzer: Make Thomas' fix from bugzilla actually work as intended, write commit log]
* i965/screen: Drop get_tiled_heightJason Ekstrand2017-07-121-17/+3
| | | | | | | It's no longer used. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/screen: Use ISL for doing image import checksJason Ekstrand2017-07-121-4/+28
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/screen: Use ISL for allocating image BOsJason Ekstrand2017-07-121-22/+29
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel/isl: Add a helper to convert tilings from ISL to i915Jason Ekstrand2017-07-122-0/+28
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel/isl: Add basic modifier introspectionJason Ekstrand2017-07-124-0/+83
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Add an isl_device to intel_screenJason Ekstrand2017-07-123-1/+8
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Move CCS allocation into create_for_dri_imageJason Ekstrand2017-07-121-13/+12
| | | | | | | | Any form of CCS on gen9+ only works on Y-tiled images. The only caller of create_for_bo which uses Y-tiled BOs is create_for_dri_image. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Use create_for_dri_image in intel_update_image_bufferJason Ekstrand2017-07-121-9/+14
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Add support for window system images to create_for_dri_imageJason Ekstrand2017-07-124-6/+17
| | | | | | | | | | We want to start using create_for_dri_image for all miptrees created from __DRIimage, including those which come from a window system. In order to allow for fast clears to still work on window system buffers, we need to allow for creating aux surfaces. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Add a colorspace parameter to create_for_dri_imageJason Ekstrand2017-07-124-5/+28
| | | | | | | The __DRI_FORMAT enums are all UNORM but we will frequently want sRGB when creating miptrees for renderbuffers. This lets us specify. Reviewed-by: Chad Versace <[email protected]>
* main/formats: Add a get_linear_format_srgb helperJason Ekstrand2017-07-122-0/+25
| | | | Reviewed-by: Chad Versace <[email protected]>
* main/formats: Autogenerate _mesa_get_srgb_format_linearJason Ekstrand2017-07-122-117/+46
| | | | | | | | | | | | | | | | | | Due to the wonders of autogeneration, this new version covers a few formats that the old version was missing: MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6 Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Allocate mt earlier in update winsysBen Widawsky2017-07-123-18/+37
| | | | | | | | | | | | | Later commits require intel_update_image_buffer() to have control over the miptree creation. However, intel_update_winsys_renderbuffer_miptree() currently creates it based on the given buffer object. This patch moves the creation to the caller side. Signed-off-by: Ben Widawsky <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Add a return for updating of winsysBen Widawsky2017-07-123-10/+14
| | | | | | | | | | | | | | | | There is nothing particularly useful to do currently if the update fails, but there is no point carrying on either. As a result, this has a behavior change. v2: Make the return type a bool (Topi) v3: Don't leak the bo if update_winsys_renderbuffer fails. (Jason) Signed-off-by: Ben Widawsky <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> (v2) Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Use miptree_create_for_dri_image in image_target_renderbuffer_storageJason Ekstrand2017-07-121-22/+1
| | | | | | | | | This does make a tiny functional change in that we now also test for whether or not the format supports texturing and not just rendering. However, this should have no practical effect as all renderbuffers use texturable formats. Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Set level_x/h in create_for_dri_imageJason Ekstrand2017-07-121-0/+2
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Add tile_x/y to total_width/heightJason Ekstrand2017-07-121-2/+2
| | | | | | | | | | | | | | | This is what we do in intel_image_target_renderbuffer_storage and it makes more sense than stomping them. Because the image gets created as a 2D image with one miplevel, they should already be equal to the provided width/height. Adding the tile offset makes some sense depending on how you interpret the fields. The only place these fields are used for in state setup is to set up the image parameters we pass into shaders. There may be issues here if you try to use image_load_store on something pulled in from EGL but that's probably broken already. This just makes it consistently broken. Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Pass the offset into create_for_bo in create_for_dri_imageJason Ekstrand2017-07-121-3/+1
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Move the DRIimage -> miptree code to intel_mipmap_tree.cJason Ekstrand2017-07-123-110/+112
| | | | | | | | | | | This is mostly a direct port. The only bit of refactoring that was done was to make creating a planar miptree be an early return from the non-planar case. Alternatively, we could have three functions: two helpers and a main function to just call the right helper. Making the planar case an early return seemed cleaner. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* nv50/ir: fix threads calculation for non-compute shadersIlia Mirkin2017-07-121-5/+9
| | | | | | | | | | We were using the "cp" union fields, which are only valid for compute shaders. The threads calculation affects the available GPRs, so just pick a small number for other shader types to avoid limiting available registers. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* freedreno/ir3: fix load_front_face conversionIlia Mirkin2017-07-121-6/+3
| | | | | | | | | | | | | | The comments are correct - we get -1 and 0. However by adding 1, we convert this into 0,1. This mostly works for conditionals, but when negated, this will yield the wrong result. Instead just negate the values (as they are backwards -- -1 means back instead of front). Fixes tests/shaders/glsl-fs-frontfacing-not.shader_test and dEQP-GLES3.functional.shaders.builtin_variable.frontfacing on A530. The latter also tested on A306 by Rob Clark. Signed-off-by: Ilia Mirkin <[email protected]>
* radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BITAlex Smith2017-07-133-29/+74
| | | | | | | | | | | | | | | | | | If a cube image has VK_IMAGE_USAGE_STORAGE_BIT set, the type in an image view's descriptor was set to a 2D array (and a few other fields adjusted accordingly). This is correct when the image view is actually bound as a storage image, but not when bound as a sampled image. In that case the type should be set as a cube. Fix by generating 2 sets of descriptors at view creation time for both storage and non-storage usage, and then choose between them based on descriptor type when writing descriptor sets. v2: Generate storage descriptors for images with TRANSFER_DST, since those may be used as storage images internally. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix possible invalid free of dynamic descriptorsAlex Smith2017-07-131-1/+0
| | | | | | | | | This free was left in after dynamic descriptors were changed to not be allocated separately from the descriptor set, and can cause a crash. Fixes: 39644fa40a3 ("radv: Don't allocate dynamic descriptors separately") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* swr: Add path to draw directly from client memory without copy.Bruce Cherniak2017-07-125-11/+51
| | | | | | | | | | | | | | | | If size of client memory copy is too large, don't copy. The draw will access user-buffer directly and then block. This is faster and more efficient than queuing many large client draws. Applications that still use large client arrays benefit from this. VMD is an example. The threshold for this path defaults to 32KB. This value can be overridden by setting environment variable SWR_CLIENT_COPY_LIMIT. v2: Use #define for default value, rather than hard-coded constant. Reviewed-by: Tim Rowley <[email protected]>
* swr: Move environment config options into separate function.Bruce Cherniak2017-07-121-26/+34
| | | | | | | | Moved reading of environment config options out of swr_create_screen_internal, into a separate swr_validate_env_options. This is to keep from cluttering create_screen. Reviewed-by: Tim Rowley <[email protected]>
* swr: Remove hard-coded constant and "todo" comment.Bruce Cherniak2017-07-121-1/+2
| | | | | | | | Removed the hard-coded constant in favor of a #define. Also removed TODO comment. The constant value doesn't need an environment configurable option. Reviewed-by: Tim Rowley <[email protected]>
* Android: Fix vc4 build since XML changes.Rob Herring2017-07-122-6/+6
| | | | | | | | | | | | | | Since commit 7f80a9ff1312 ("vc4: Introduce XML-based packet header generation like Intel's."), the vc4 build on Android is broken: out/target/product/linaro_x86_64/gen/STATIC_LIBRARIES/libmesa_broadcom_genxml_intermediates/broadcom/cle/v3d_packet_v21_pack.h:12:10: fatal error: 'v3d_packet_helpers.h' file not found external/mesa3d/src/gallium/drivers/vc4/vc4_cl_dump.c:28:10: fatal error: 'vc4_packet.h' file not found The path of the generated header needs to be fixed since we build out of tree. Acked-by: Eric Anholt <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* st/mesa: add a winsys buffers list in st_contextCharmaine Lee2017-07-117-11/+93
| | | | | | | | | | | | | | | | | | | | | Commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 fixes the dangling framebuffer object by unreferencing the window system draw/read buffers when context is released. However this can prematurely destroy the resources associated with these window system buffers. The problem is reproducible with Turbine Demo running with VMware driver. In this case, the depth buffer content was lost when the context is rebound to a drawable. To prevent premature destroy of the resources associated with window system buffers, this patch maintains a list of these buffers in the context, making sure the reference counts of these buffers will not reach zero until the associated framebuffer interface objects no longer exist. This also helps to avoid unnecessary destruction and re-construction of the resources associated with the framebuffer. Fixes VMware bug 1909807. Reviewed-by: Brian Paul <[email protected]>
* i965: Drop bogus pthread_mutex_unlock in map_gtt error path.Kenneth Graunke2017-07-121-1/+0
| | | | | | | | | | The locking was supposed to go away in commit 314647c4c206917ec01b7 (i965: Drop global bufmgr lock from brw_bo_map_* functions.), but this lone unlock remains. I'm guessing I messed this up when splitting up Chris's patch. Reviewed-by: Chris Wilson <[email protected]>
* intel/compiler: Don't use opt_sampler_eot() optimization on gen10+Anuj Phogat2017-07-121-1/+1
| | | | | | | This optimization has been removed on gen10+. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vc4: Set shareable BOs as T tiled if possibleEric Anholt2017-07-124-13/+182
| | | | | | | | | | | | | | | | | | | | | | | | X11 and GL compositor performance on VC4 has been terrible because of our SHARED-usage buffers all being forced to linear. This swaps SHARED && !LINEAR buffers over to being tiled. This is an expected win for all GL compositors during rendering (a full copy of each shared texture per draw call), allows X11 to be used with decent performance without a GL compositor, and improves X11 windowed swapbuffers performance as well. It also halves the memory usage of shared buffers that get textured from. The only cost should be idle systems with a scanout-only buffer that isn't flagged as LINEAR, in which case the memory bandwidth cost of scanout goes up ~25%. This implements the EGL_EXT_image_dma_buf_import_modifiers extension, supporting the VC4 T_TILED modifier. v2: Added modifier support to resource creation/import, and advertisement (by daniels). v3: Fix old-kernel fallback path, fix compiler error and warnings, and comment touchups (by anholt). Reviewed-by: Daniel Stone <[email protected]>