summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* swr: don't clear all dirty bits when changing so targetsIlia Mirkin2016-11-281-1/+1
| | | | | | | | | | Among other things, blits would clear existing SO targets which would cause a bunch of updates from u_blitter to be missed. Fixes fbo-scissor-blit fbo, probably among many others. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] fix typo in scissor tile-alignment logicIlia Mirkin2016-11-281-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* anv: Fix cache UUID generation.Kenneth Graunke2016-11-281-2/+2
| | | | | | | | | | I asked Emil to switch from 0 (success) vs. -1 (fail) to use a boolean in my review comments. The "not" went missing. Easy mistake, but the result is that nothing runs at all :) Fix whitespace while we're here too. Signed-off-by: Kenneth Graunke <[email protected]>
* vulkan/wsi: Fix resource leak in success path of wsi_queue_init()Gwan-gyeong Mun2016-11-281-0/+1
| | | | | | | | | It fixes leakage of pthread_condattr resource on wsi_queue_init() Cc: "13.0" <[email protected]> Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* anv: Update the teardown in reverse order of the anv_CreateDeviceGwan-gyeong Mun2016-11-281-9/+14
| | | | | | | | | | | This updates releasing of resource in reverse order of the anv_CreateDevice to anv_DestroyDevice. And it fixes resource leak in pthread_mutex, pthread_cond, anv_gem_context. Cc: "13.0" <[email protected]> Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: drop the return type for anv_queue_init()Gwan-gyeong Mun2016-11-281-3/+1
| | | | | | | | | anv_queue_init() always returns VK_SUCCESS, so caller does not need to check return value of anv_queue_init(). Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add missing error-checking to anv_block_pool_init (v2)Gwan-gyeong Mun2016-11-282-8/+23
| | | | | | | | | | | | | | | | | | | When the memfd_create() and u_vector_init() fail on anv_block_pool_init(), this patch makes to return VK_ERROR_INITIALIZATION_FAILED. All of initialization success on anv_block_pool_init(), it makes to return VK_SUCCESS. CID 1394319 v2: Fixes from Emil's review: a) Add the return type for propagating the return value to caller. b) Changed anv_block_pool_init() to return VK_ERROR_INITIALIZATION_FAILED on failure of initialization. Cc: "13.0" <[email protected]> Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/omx/dec/h264: consider POC as signed instead of unsignedChandu Babu Namburu2016-11-281-3/+3
| | | | | | picture order count can be a negative value Reviewed-by: Christian König <[email protected]>
* radv: don't return VK_SUCCESS if radv_device_get_cache_uuid() failsEmil Velikov2016-11-281-0/+2
| | | | | | | | | If radv_device_get_cache_uuid() fails result will be VK_SUCCESS as set by the radv_init_wsi() call above. Fixes: d943839 (radv: Use library mtime for cache UUID.) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: don't leak the fd if radv_physical_device_init() succeedsEmil Velikov2016-11-281-0/+1
| | | | | | | | | | radv_amdgpu_winsys_create() does not take ownership of the fd, thus we end up leaking it as we return with VK_SUCCESS. Cc: Dave Airlie <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv: don't leak memory if anv_init_wsi() failsEmil Velikov2016-11-281-2/+4
| | | | | | | | brw_compiler_create() rzalloc-ates memory which we forgot to free. Cc: "13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: don't double-close the same fdEmil Velikov2016-11-281-2/+1
| | | | | Cc: "13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: automake: don't generate anv_timestamp.hEmil Velikov2016-11-282-8/+1
| | | | | | No longer used as of last commit. Signed-off-by: Emil Velikov <[email protected]>
* anv: Use library mtime for cache UUID.Emil Velikov2016-11-281-4/+30
| | | | | | | | | | | | | | | | | Inspired by a similar commit for radv. Rather than recomputing the timestamp on each make invocation, just fetch it at runtime. Thus we no longer get the constant rebuild of anv_device.c and the follow-up libvulkan_intel.so link, when nothing has changed. I.e. using make && make install is a little bit faster. v2: Use bool return type (Ken). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: Store UUID in physical device.Emil Velikov2016-11-283-14/+15
| | | | | | | | | Port of an equivalent commit for radv. v2: Move the call just after MMAP_VERSION (Ken). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: Make isl_finishme only warn once per call-siteEmil Velikov2016-11-281-1/+7
| | | | Signed-off-by: Emil Velikov <[email protected]>
* radv: Make radv_finishme only warn once per call-siteEmil Velikov2016-11-281-1/+7
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv: use do { } while (0) in the anv_finishme macroEmil Velikov2016-11-281-7/+8
| | | | | | | | Use the generic construct instead of the currect GCC specific one. Suggested-by: Kenneth Graunke <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radv: fix 3D clears with baseMiplevelDave Airlie2016-11-281-1/+1
| | | | | | | | | | | | This fixes: dEQP-VK.api.image_clearing.clear_color_image.3d* These were hitting an assert as the code wasn't taking the baseMipLevel into account when minify the image depth. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Cc: "13.0" <[email protected]>
* radv: brown-paper bag for a forgotten else.Dave Airlie2016-11-281-1/+1
| | | | | | | | This fixes the fix: radv/ac/llvm: fix regression with shadow samplers fix Signed-off-by: Dave Airlie <[email protected]> Cc: "13.0" <[email protected]>
* radv/ac/llvm: fix regression with shadow samplers fixDave Airlie2016-11-281-3/+3
| | | | | | | | | | | This fixes b56b54cbf1d8e70c87a434da5350d11533e5fed8: radv/ac/llvm: shadow samplers only return one value It makes sure we only do that for shadow sampling, as opposed to sizing requests. Signed-off-by: Dave Airlie <[email protected]> Cc: "13.0" <[email protected]>
* radv/ac/llvm: shadow samplers only return one value.Dave Airlie2016-11-271-1/+3
| | | | | | | | The intrinsic engine asserts in llvm due to this. Reported-by: Christoph Haag <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/si: fix optimal micro tile selectionDave Airlie2016-11-271-7/+7
| | | | | | | | The same fix was posted for radeonsi, so port it here. Reviewed-by: Edward O'Callaghan <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: honour the number of properties availableEmil Velikov2016-11-271-11/+7
| | | | | | | | | | | Cap up-to the number of properties available while copying the data. Otherwise we might crash and/or leak data. Cc: Dave Airlie <[email protected]> Cc: "13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop the return type for radv_queue_init()Mun Gwan-gyeong2016-11-271-3/+1
| | | | | | | | radv_queue_init() always returns VK_SUCCESS, so caller does not need to check return value of radv_queue_init(). Signed-off-by: Mun Gwan-gyeong <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* freedreno: fix slice size for imported buffersRob Clark2016-11-271-0/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: make _emit_const() staticRob Clark2016-11-272-5/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: make _emit_const() staticRob Clark2016-11-273-6/+2
| | | | Signed-off-by: Rob Clark <[email protected]>
* anv/pipeline: Make is_dual_src_blend_factor inlineJason Ekstrand2016-11-261-1/+1
| | | | | | It's not used on gen8+ so it causes unused function warnings. Reviewed-by: Ilia Mirkin <[email protected]>
* anv/pipeline: Make the temp blend attachment state pointer constJason Ekstrand2016-11-261-1/+3
| | | | | | This fixes a "discards const" warning since blend is const. Reviewed-by: Ilia Mirkin <[email protected]>
* gm107/ir: optimize 32-bit CONST load to movSamuel Pitoiset2016-11-262-0/+17
| | | | | | | | | This is not allowed for indirect accesses because the source GPR might be erased by a subsequent instruction (WaR hazard) if we don't emit a read dep bar. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gm107/ir: do not combine CONST loadsSamuel Pitoiset2016-11-261-2/+7
| | | | | | | | | | | | | | This will allow to use MOV instead of LD. The main advantage is that MOV doesn't require a read dependency barrier while LD does, and so this will both reduce barriers pressure and the number of stall counts needed to read data from constant memory. This is currently only for user uniform accesses. I should do something similar when loading from the driver constant buffer but it seems like a bit tricky to handle for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* anv/device: Remove a bogus finishme commentJason Ekstrand2016-11-251-1/+0
| | | | We've been properly detecting bit6 swizzling for a long time now.
* i965: Enable fast clears for multi-lodBen Widawsky2016-11-251-15/+0
| | | | | | | | | | | | | | | | | | | | On SKL (also fast clear is used for level 0, layer 0): Manhattan 3.0: 3.88434% +/- 0.814659% Manhattan 3.0 off: 3.25542% +/- 0.101149% Trex: 3.43501% +/- 0.31223% Trex off: 4.13781% +/- 0.0993569% ON BDW: Manhattan 3.0: 1.37079% +/- 0.571208% Manhattan 3.0 off: 1.74029% +/- 0.267499% v2 (Ben, Matt): Fix rebase error by removing the perf warning v3 (Topi): Rebased on top of revised eligibility logic Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Allow single-sampled miptree to be resolved and sharedTopi Pohjolainen2016-11-251-1/+1
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/gen8: Relax asserts prohibiting arrayed/mipmapped fast clearsTopi Pohjolainen2016-11-253-14/+18
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use ISL for CCS layoutsTopi Pohjolainen2016-11-252-104/+38
| | | | | | | | | | One can now also delete intel_get_non_msrt_mcs_alignment(). v2 (Jason): Do not leak aux buf but allocate only after getting ISL surfaces. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Resolve non-compressed fast clears prior layered renderingTopi Pohjolainen2016-11-251-0/+13
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Restrict fast color clear on first slice onlyTopi Pohjolainen2016-11-251-0/+8
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Track fast color clear state in level/layer granularityTopi Pohjolainen2016-11-253-30/+68
| | | | | | | | | | | | | | | | Note that RESOLVED is not tracked in the map explicitly. Absence of item implicitly means RESOLVED state. v2: Added intel_resolve_map_clear() into intel_miptree_release() v3 (Jason): Properly handle the assumption of resolve map not containing any items with state RESOLVED. Removed unnecessary intel_miptree_set_fast_clear_state() call in brw_blorp_resolve_color() preventing intel_miptree_set_fast_clear_state() from asserting against RESOLVED. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Move fast clear state enumeration into resolve mapTopi Pohjolainen2016-11-253-65/+68
| | | | | | | | Status is still tracked per miptree. Next patch will switch to resolve map per slice/level. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Refactor check if color resolve is neededTopi Pohjolainen2016-11-251-15/+28
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add plumbing for fast clear layer/level detailsTopi Pohjolainen2016-11-252-19/+34
| | | | | | | | | | | | | | | | | | | | | | Until now fast clear has been supported only for non-layered and non-mipmapped buffers. However, from gen8 onwards there is hardware support also for layered/mipmapped. Once this is enabled, fast clear operations target specific layer/level and call for the state to be tracked in the same granularity. This is the first step providing the details from callers to the state tracking. Patch introduces new interface for reading and writing the state hiding the upcoming bookkeeping changes in the call sites. There is bunch of sanity checks added that will be relaxed per hardware generation later on when the actual functionality is enabled. v2: Rebased on top current master setting the state in blorp_surf_for_miptree(). v3: Replace open-coded resolved check in surface state emission with intel_miptree_has_color_unresolved(). Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add interface for checking multiple slices if any is unresolvedTopi Pohjolainen2016-11-252-0/+13
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Provide slice details to renderbuffer fast clear state trackerTopi Pohjolainen2016-11-254-16/+68
| | | | | | | | This patch also introduces getter and setter for fast clear state preparing for tracking the state per slice. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Split per miptree and per slice/level fast clear bitsTopi Pohjolainen2016-11-253-16/+16
| | | | | | | | | | | | | | | | Currently the status bits for fast clear include the flag telling if non-multisampled mcs buffer should be used at all. Once the state tracking is changed to follow individual levels/layers one still needs to have the mcs enabling information in the miptree. Therefore simply split it out to its own boolean. Possible follow-up work is to combine disable_aux_buffers and no_ccs into single enum. v2 (Jason): Changed no_msrt_mcs to no_ccs and updated comment Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Provide slice details to color resolverTopi Pohjolainen2016-11-256-18/+51
| | | | | | | | v2: Make intel_miptree_resolve_color() take start layer and layer count. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add new interface for full color resolvesTopi Pohjolainen2016-11-258-11/+23
| | | | | | | | | Upcoming patches will introduce fast clear in level/layer granularity like the driver does already for depth/hiz. This patch introduces equivalent full resolve option. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Refactor lossless compression state trackingTopi Pohjolainen2016-11-254-15/+7
| | | | | | | | | | | | | | Essentially this moves fast clear state update away from surface state setup into brw_postdraw_set_buffers_need_resolve() that gets called just after draw submission. Calling intel_miptree_used_for_rendering() can be drop for gen6 and earlier as it is no-op. v2: Rebased on top current master setting the state in blorp_surf_for_miptree(). Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "glsl: allow layout qualifier overrides with ↵Andres Gomez2016-11-251-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARB_shading_language_420pack" This reverts commit aaa69c79cd584db4d9c6ea7794e93d29f3d54572. The commit was erroneous because the ast_layout_expression class is meant to hold a list used for an after check that all the declared values for a layout-qualifier-name are consistent. Therefore, the check for the possibility of duplicated values was previously fixed to happen much sooner, in the GLSL parser and the merge of layout qualifiers, and the process_qualifier_constant method only needs to check that the values are consistent. By now, those layout-qualifier-name represented as a ast_layout_expression are "max_vertices", "invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride". From page 40 (page 46 of the PDF) of the GLSL 1.50 spec: " All geometry shader output layout declarations in a program must declare the same layout and same value for max_vertices." From page 44 (page 50 of the PDF) of the GLSL 4.00 spec: " If an invocation count is declared, all such declarations must specify the same count." From page 47 (page 53 of the PDF) of the GLSL 4.00 spec: " All tessellation control shader layout declarations in a program must specify the same output patch vertex count." From page 60 (page 66 of the PDF) of the GLSL 4.30 spec: " Also, if such a layout qualifier is declared more than once in the same shader, all those declarations must set the same set of local work-group sizes and set them to the same values; otherwise a compile-time error results. If multiple compute shaders attached to a single program object declare local work-group size, the declarations must be identical; otherwise a link-time error results." From page 73 (page 79 of the PDF) of the GLSL 4.40 spec: " While xfb_stride can be declared multiple times for the same buffer, it is a compile-time or link-time error to have different values specified for the stride for the same buffer." Fixes GL44-CTS.enhanced_layouts.xfb_duplicated_stride Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>