summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965/wm: Use isl for filling tex image parametersTopi Pohjolainen2017-07-183-92/+19
| | | | | | | | This helps to drop dependency to miptree::total_height which is used in brw_miptree_get_vertical_slice_pitch(). Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* intel/isl: Take 3D surfaces into account in image paramsTopi Pohjolainen2017-07-181-2/+6
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Check for miptree_create() failuresTopi Pohjolainen2017-07-181-0/+2
| | | | | | | Rest of the function assumes it always succeeds. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Do not rely on msaa type to decide if aux is neededTopi Pohjolainen2017-07-182-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the driver moves to ISL both compressed and uncompressed have the same type. One needs to tell them apart by other means. This can be done by checking the existence of mcs_buf. There is a short period of time within intel_miptree_create() where mcs_buf doesn't exist yet (between calls to intel_miptree_create_layout() and intel_miptree_alloc_mcs()). First compute_msaa_layout() makes the decision if compression is to be used and sets the msaa_layout type. Then based on the type one sets aux_usage and finally decides if mcs_buf is needed. This patch duplicates the logic in compute_msaa_layout() and uses that to make the decision on aux_usage and mcs_buf allocation. Most of the original logic in compute_msaa_layout() will be gone in later patch leaving only one version. Elsewhere only brw_populate_sampler_prog_key_data() needs to know if compression is used based on the msaa_type. This is now replaced with consideration for number of samples and existence of mcs_buf. All other occurrences consider CMS || UMS which can be represented using single the type of ISL_MSAA_LAYOUT_ARRAY without any tweaks. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965: Make irb::mt_layer logical instead of physicalTopi Pohjolainen2017-07-184-59/+12
| | | | | | | | | same as irb::layer_count. In case of copies and blits msaa surfacas already fall to blorp which natively works with logical slices. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/tex: Use offset helper instead of accessing table directlyTopi Pohjolainen2017-07-182-4/+8
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965: Mark read-only args as const in intel_miptree_supports_hiz()Topi Pohjolainen2017-07-181-2/+2
| | | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Use > 1 instead of > 0 to check for multisamplingTopi Pohjolainen2017-07-181-2/+2
| | | | | | | | | | | | Checking against zero currently works as single sampling is represented with zero. Once one moves to isl single sampling really has sample number of one. This keeps later patches simpler. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Set refcount before failing via _release()Topi Pohjolainen2017-07-181-1/+2
| | | | | | | | | Otherwise one wraps uint to UINT_MAX via -1. Fixes: 3cf470f2b6c ("i965: Add isl based miptree creator") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* build: Add $(top_srcdir)/src/compiler/spirv to AM_CPPFLAGSKenneth Graunke2017-07-181-0/+1
| | | | | | | | | | Generated C files try to include spirv_info.h. For in-tree builds, the header is in the same directory, so it just works. For out-of-tree builds, we need to look for it in srcdir rather than builddir. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101831 Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radeonsi: add back the USE_MININUM_PRIORITY flag to the low-prio compiler queueMarek Olšák2017-07-181-1/+2
| | | | | | | Accidentally removed in 9f320e0a387a1009c5218daf130b3b754a3c2800. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* compiler/spirv: Add a .gitignore and ignore spirv_info.cJason Ekstrand2017-07-181-0/+1
|
* anv: Advertise support for VK_KHR_variable_pointersJason Ekstrand2017-07-183-0/+13
| | | | | | | | We don't support the general version yet because that requires us to lower shared variables up-front in SPIR-V -> NIR. This shouldn't be a whole lot of work but it's not something we support today. Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: Advertise support for VK_KHR_storage_buffer_storage_classJason Ekstrand2017-07-182-0/+5
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/spirv: Add support for SPV_KHR_variable_pointersJason Ekstrand2017-07-185-10/+108
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/spirv: Add a helper for pushing SSA valuesJason Ekstrand2017-07-184-10/+20
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/spirv: Implement OpPtrAccessChain for buffersJason Ekstrand2017-07-183-4/+34
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* spirv/nir: Add some useful asserts for type decorationsJason Ekstrand2017-07-181-0/+4
| | | | | | | Now that vtn_type has piles of unions, we should assert sanity before setting fields that may stomp others. Reviewed-by: Iago Toral Quiroga <[email protected]>
* spirv: Add support for the StorageBuffer storage classJason Ekstrand2017-07-181-0/+4
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* spirv: Generate spirv_info.cIan Romanick2017-07-185-159/+106
| | | | | | | | | | | | | | | | | | The old table based spirv_*_to_string functions would return NULL for any values "inside" the table that didn't have entries. The tables also needed to be updated by hand each time a new spirv.h was imported. Generate the file instead. v2: Make this script work more like src/mesa/main/format_fallback.py. Suggested by Jason. Remove SCons supports. Suggested by Jason and Emil. Put all the build work in Makefile.nir.am in lieu of adding a new Makefile.spirv.am. Suggested by Emil. Add support for Android builds based on code provided by Emil. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* spirv: Import the lastest 1.0.2 JSON from KhronosIan Romanick2017-07-181-0/+5792
| | | | | Signed-off-by: Ian Romanick <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* spirv: Import the latest 1.2 header from KhronosJason Ekstrand2017-07-181-4/+37
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: whitespace fixes in get.cBrian Paul2017-07-181-110/+110
| | | | | | Remove trailing whitespace. Replace tabs with spaces. Trivial.
* mesa: fix GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT queryBrian Paul2017-07-182-1/+13
| | | | | | | | This query is not allowed in GL core profile 3.3 and later (since GL_QUADS and GL_QUAD_STRIP are disallowed). The query was (mistakenly) supported in GL 3.2. This fixes the glGet error test accordingly. Reviewed-by: Neha Bhende<[email protected]>
* vulkan/util: fix typo in commentEric Engestrom2017-07-181-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* mapi: add missing no_error tag to glBlitNamedFramebuffer()Samuel Pitoiset2017-07-181-1/+1
| | | | | | Fixes: 6fedb31785 ("mesa: add KHR_no_error support for glBlitNamedFramebuffer()") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radv: Set the RADEON_SURF_OPTIMIZE_FOR_SPACE flag for imagesAlex Smith2017-07-181-0/+1
| | | | | | | | | | | | | This looks like a regression from df301237940 ("radv: use ac_compute_surface"). Before that, the opt4Space addrlib flag was set to true unless the image has FMASK (ac_compute_surface will similarly only set that flag for images without FMASK). This saves multiple gigabytes of VRAM on one of our games, and brings its VRAM utilisation on RADV in line with AMDGPU-PRO and NVIDIA. Signed-off-by: Alex Smith <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't shadow meta_va.Dave Airlie2017-07-181-1/+1
| | | | | | Coverity warned about dead code below, as meta_va was being shadowed. Signed-off-by: Dave Airlie <[email protected]>
* i965: Delete brw_sf_state.c againKenneth Graunke2017-07-171-200/+0
| | | | | | | | | | | | "...and stay dead!" Rafael deleted this file in c2b5a26dc25b9c62954a75465e25294c7fd3851a (i965: Convert SF_STATE to genxml.) but Marek accidentally brought it back in commit e7a091936fb6fd578c6ced9baa38b306b638a11b (mesa: replace ctx->Polygon._FrontBit with a helper function) when resolving conflicts. It's not actually even compiled, but it's still here trolling people into thinking it still exists and needs patching.
* ac/nir: rewrite shared variable handling (v2)Connor Abbott2017-07-171-87/+158
| | | | | | | | | | | | | | | | Translate the NIR variables directly to LLVM instead of lowering to a TGSI-style giant array of vec4's and then back to a variable. This should fix indirect dereferences, make shared variables more tightly packed, and make LLVM's alias analysis more precise. This should fix an upcoming Feral title, which has a compute shader that was failing to compile because the extra padding made us run out of LDS space. v2: Combine the previous two patches into one, only use this for shared variables for now until LLVM becomes smarter. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Alex Smith <[email protected]>
* i965: Check if the modifier is supported in select_best_modifierJason Ekstrand2017-07-171-0/+3
| | | | | | | | Otherwise, if a client gave us a list of modifiers that contained a modifier we understand but which is not supported on the hardware, we might return that one and then fail to create the image. Reviewed-by: Daniel Stone <[email protected]>
* i965: Rework the modifier info mapJason Ekstrand2017-07-171-23/+25
| | | | | | | | | | This commit splits the mapping in half. The modifier_infos table now only contains the modifier and the since_gen field. The tiling bits have been moved into a table in tiling_to_modifier as that's the only place it was ever used. The modifier_is_supported function now takes a devinfo and does the since_gen check. Reviewed-by: Daniel Stone <[email protected]>
* i965/surface_state: Remove the mcs_buf->offset == 0 restrictionJason Ekstrand2017-07-171-1/+0
| | | | | | | | | This assert was removed in b0cc55f29831638069407a4c1a5c809b26902ab6 but got added back in 1a43d774b613d0b00e26b28cc752d944ce8049aa, probably by accident. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl: Add a row_pitch parameter to surf_get_ccs_surfJason Ekstrand2017-07-174-4/+8
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Use BO_ALLOC_ZEROED for CCS_E buffersJason Ekstrand2017-07-171-23/+13
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/screen: Allocate ZEROED BOs for imagesJason Ekstrand2017-07-171-1/+5
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965/bufmgr: Add a BO_ALLOC_ZEROED flagJason Ekstrand2017-07-172-2/+27
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Replace is_lossless_compressed with mt->aux_usage checksJason Ekstrand2017-07-175-41/+10
| | | | | | | | | | Now that we have an actual aux_usage field, we no longer need the complex logic of is_lossless_compressed in order to figure out if a miptree is CCS_E compressed. As a side-effect, there is not longer any need to overload MSAA_LAYOUT_CMS for CCS_E and we can stop doing so. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Allocate HiZ up-frontJason Ekstrand2017-07-172-17/+6
| | | | | | | | | | | | | HiZ, like MCS and CCS_E, can compress more than just clear colors so we want it turned on whenever the miptree is being used as a depth attachment. It's theoretically possible for someone to create a depth texture, upload data with glTexSubImage2D, and texture from it without ever binding it as a depth target. If this happens, we would end up wasting a bit of space by allocating a HiZ surface we never use. However, this is rather unlikely out side of test cases, so we're better off just allocating it up-front. Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Add an intel_tiling_supports_hiz helperJason Ekstrand2017-07-171-1/+11
| | | | | | | | | | We need this split for the same reason that we need the split for CCS: intel_miptree_supports_hiz is called *before* we choose the actual tiling. Adding a tiling_supports_hiz helper lets choose_aux_usage more accurately decide whether or not to enable hiz. In particular, this prevents us from enabling HiZ on linear depth buffers. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Gather initial aux allocation into a single functionJason Ekstrand2017-07-171-30/+53
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* st/mesa: init winsys buffers list only if context creation succeedsCharmaine Lee2017-07-111-3/+3
| | | | | | | | Fixes piglit test crash when context creation fails. v2: As suggested by Brian, move the init to st_create_context_priv() Reviewed-by: Brian Paul <[email protected]>
* winsys/svga/drm: Enable import/export fence FDSinclair Yeh2017-07-173-19/+53
| | | | | | | | | Enable the capability if the DRM supports it. Hook up mechanism to send and receive fence FD from the DRM. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Connect winsys-side fence_* functionsSinclair Yeh2017-07-174-10/+109
| | | | | | | | | Connect fence_get_fd, fence_create_fd, and fence_server_sync. Implement the required functions in vmw_fence module. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga: Connect driver-side fence_* functionsSinclair Yeh2017-07-172-1/+56
| | | | | | | | | Connect fence_get_fd, fence_create_fd, and fence_server_sync. Return PIPE_CAP_NATIVE_FENCE_FD capability based on what the winsys reports Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Create winsys interface for Fence FDSinclair Yeh2017-07-171-1/+33
| | | | | | | | The new interfaces will be used to enable EGL_ANDROID_native_fence_sync. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Prepare to support fence fdSinclair Yeh2017-07-171-3/+8
| | | | | | | Make the fields and flags available. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga, winsys/svga/drm: Thread through timeout for fence_finishSinclair Yeh2017-07-177-8/+18
| | | | | | | | | | | | The timeout parameter is required to implement EGL_ANDROID_native_fence_sync. v2 * Replaced default timeout from 0 to PIPE_TIMEOUT_INFINITE * Add more documentation to the new timeout parameter Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace clean-up in svga_winsys.hBrian Paul2017-07-171-67/+66
| | | | Trivial.
* svga: add some const qualifiersBrian Paul2017-07-171-3/+3
| | | | Trivial.