summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* v3d: Move clif dumping to a separate step from noting where the CLs are.Eric Anholt2018-07-273-3/+19
| | | | Now all the printing happens from the same worklist processing.
* v3d: Move clif dump BO lookup into the clif dumper.Eric Anholt2018-07-275-38/+68
| | | | | The clif dumper is going to need information about all of our BOs if we're going to dump them for replay purposes.
* v3d: Pass the whole clif_dump structure to v3d_print_group().Eric Anholt2018-07-275-11/+18
| | | | | | To generate CLIF files that the v3dv3 simulator can parse, we're going to need to decode addresses, and for that we'll need the vaddr lookup function from the clif structure from within v3d_decoder.
* ac: pass write param to get_sampler_desc() from get_image_descriptor()Timothy Arceri2018-07-281-1/+1
| | | | | | | Looks like a mistake from when the deref stuff landed. Fixes: 506a07e4e3a4 ("ac/nir: Add deref support to image intrinsics.") Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/u_vbuf: split u_vbuf_get_minmax_index function (v2)Marek Olšák2018-07-271-50/+51
| | | | | | | | This will be used by indirect multidraws. v2: clean up the function further, change return types to unsigned Reviewed-by: Eric Anholt <[email protected]> (v1)
* gallium/auxiliary: Extern "c" fixes.Alexander von Gluck IV2018-07-273-0/+24
| | | | | | Used by C++ code such as Haiku's renderer. Reviewed-by: Brian Paul <[email protected]>
* gallium/noop: implement invalidate_resourceMarek Olšák2018-07-271-0/+6
|
* radv: fix cdw check vs tracing emitDave Airlie2018-07-281-2/+2
| | | | | | | If we have tracing enabled we could do all the tracing emits and overflow the precalculated cdw_max. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: return binary code_size not variant code size to cacheDave Airlie2018-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code sizes return here get passed to the cache shader insert function, which then memcpy from the code ptr, and causes all sorts of valgrind errors like: ==6755== Invalid read of size 8 ==6755== at 0x4C32FEE: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1021) ==6755== by 0x2305D4C7: radv_pipeline_cache_insert_shaders (radv_pipeline_cache.c:416) ==6755== by 0x2305791D: radv_create_shaders (radv_pipeline.c:2158) ==6755== by 0x2305C523: radv_pipeline_init (radv_pipeline.c:3404) ==6755== by 0x2305C890: radv_graphics_pipeline_create (radv_pipeline.c:3515) ==6755== by 0x230188AB: radv_device_init_meta_blit_color (radv_meta_blit.c:871) ==6755== by 0x2301D50E: radv_device_init_meta_blit_state (radv_meta_blit.c:1278) ==6755== by 0x23011893: radv_device_init_meta (radv_meta.c:352) ==6755== by 0x2300744B: radv_CreateDevice (radv_device.c:1576) ==6755== by 0x5187D0F: ??? (in /usr/lib64/libvulkan.so.1.1.77) ==6755== by 0x518F6A3: ??? (in /usr/lib64/libvulkan.so.1.1.77) ==6755== by 0x5192A42: vkCreateDevice (in /usr/lib64/libvulkan.so.1.1.77) ==6755== Address 0x22a58548 is 4 bytes after a block of size 116 alloc'd ==6755== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==6755== by 0x23089DC4: ac_elf_read (ac_binary.c:144) ==6755== by 0x23090A60: ac_compile_module_to_binary (ac_llvm_helper.cpp:162) ==6755== by 0x23053F06: compile_to_memory_buffer (radv_llvm_helper.cpp:58) ==6755== by 0x23053F06: radv_compile_to_binary (radv_llvm_helper.cpp:98) ==6755== by 0x23052769: ac_llvm_compile (radv_nir_to_llvm.c:3394) ==6755== by 0x23052823: ac_compile_llvm_module (radv_nir_to_llvm.c:3418) ==6755== by 0x23053C05: radv_compile_nir_shader (radv_nir_to_llvm.c:3542) ==6755== by 0x23061B4E: shader_variant_create (radv_shader.c:580) ==6755== by 0x23061CFD: radv_shader_variant_create (radv_shader.c:634) ==6755== by 0x23057765: radv_create_shaders (radv_pipeline.c:2123) ==6755== by 0x2305C523: radv_pipeline_init (radv_pipeline.c:3404) ==6755== by 0x2305C890: radv_graphics_pipeline_create (radv_pipeline.c:3515) Since we are just inserting the code into the cache, we can avoid these bad reads and data in the cache by just using the binary code size here. Fixes: 939e5a382 (radv: add padding for the UMR disassembler) Reviewed-by: Samuel Pitoiset <[email protected]>
* v3d: Drop the use of the semaphores.Eric Anholt2018-07-272-9/+0
| | | | | | The kernel's scheduler doesn't rely on our emitting them, and in fact we'd get in trouble if the kernel decided to schedule too many bins in a row before getting around to scheduling the corresponding render.
* v3d: Drop the VG support from the XML.Eric Anholt2018-07-272-15/+3
| | | | | | This reflects a change on the HW/closed SW side to drop this unused HW. With it dropped on their side, the CLIF parser no longer expects to find VG fields.
* v3d: Use /* */ instead of () for enum names in CLIF output.Eric Anholt2018-07-271-1/+1
| | | | This lets the comments be ignored by the CLIF parser.
* v3d: CLIF-dump the "Vec size" field as 0 == maximum value.Eric Anholt2018-07-271-0/+2
| | | | | That's what a user should want to see, and what the CLIF parser wants. This should maybe be generalized.
* v3d: Stop using spaces in the names of our buffers.Eric Anholt2018-07-273-2/+6
| | | | | For CLIF dumping, we need names to not have spaces. Rather than rewriting them after the fact, just change the two cases where I had put a space in.
* i965: implement GL_MESA_framebuffer_flip_y [v3]Fritz Koenig2018-07-279-45/+43
| | | | | | | | | | | | | | Instead of using _mesa_is_winsys_fbo or _mesa_is_user_fbo to infer if an fbo is flipped use the FlipY flag. v2: * additional window-system framebuffer checks [for jason] v3: * s/inverted_y/flip_y/g [for chadv] * s/InvertedY/FlipY/g [for chadv] Reviewed-by: Chad Versace <[email protected]>
* mesa: GL_MESA_framebuffer_flip_y extension [v4]Fritz Koenig2018-07-2727-56/+146
| | | | | | | | | | | | | | | | | | | | | | | | | Adds an extension to glFramebufferParameteri that will specify if the framebuffer is vertically flipped. Historically system framebuffers are vertically flipped and user framebuffers are not. Checking to see the state was done by looking at the name field. This adds an explicit field. v2: * updated spec language [for chadv] * correctly specifying ES 3.1 [for chadv] * refactor access to rb->Name [for jason] * handle GetFramebufferParameteriv [for chadv] v3: * correct _mesa_GetMultisamplefv [for kusmabite] v4: * update spec language [for chadv] * s/GLboolean/bool/g [for chadv] * s/InvertedY/FlipY/g [for chadv] * s/inverted_y/flip_y/g [for chadv] * assert changes [for chadv] Reviewed-by: Chad Versace <[email protected]>
* gallium/auxiliary: Fix Autotools on Android (v2)Chad Versace2018-07-271-1/+5
| | | | | | | | | | | | | | | | | Problem 1: u_debug_stack_android.cpp transitively included "pipe/p_compiler.h", but src/gallium/include was missing from the C++ include path. Problem 2: Add -std=c++11 to AM_CXXFLAGS. Android's libbacktrace headers require C++11, but the Android toolchain (at least in the Chrome OS SDK) does not enable C++11 by default. v2: Add -std=c++11. Reviewed-by: Gurchetan Singh <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Cc: Eric Engestrom <[email protected]>
* i965/icl: Disable binding table prefetchingTopi Pohjolainen2018-07-272-1/+20
| | | | | | | | | | | | | Gen 11 workarounds table #2056 WABTPPrefetchDisable suggests to disable prefetching of binding tables for ICLLP A0 and B0 steppings. It fixes multiple gpu hangs in ext_framebuffer_multisample* tests on ICLLP B0 h/w. Anuj: Add comments and commit message. Add gen 11 checks in the code. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* glsl: use only copy_propagation_elementsCaio Marcelo de Oliveira Filho2018-07-276-375/+0
| | | | | | | | Now that the elements version handles both cases, remove the non-elements version. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* glsl: teach copy_propagation_elements to deal with whole variablesCaio Marcelo de Oliveira Filho2018-07-271-29/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep information in acp_entry whether the entry is full or not, and use the ACP in more nodes when visiting the instructions: - add_copy: write whole variables to the ACP state (regardless the type). - visit(ir_dereference_variable *): perform the propagation here if we have a full candidate. Element-wise here doesn't apply because the mask isn't available at this point. - visit_leave(ir_assignment *): process beyond scalar and vector, as the full variables might have other types. Also import an improvement from opt_copy_propagation.cpp: if ir_call is an intrinsic, we know the variables affected, so keep going. v2: (all from Eric Anholt) Describe how acp_entry attributes are used. Don't do book-keeping to avoid adding repeated element to the dsts in write_elements(). v3: Use _mesa_set_remove_key. (Thomas Helland) Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* i965: Disable guardband clipping on SandyBridge for odd dimensionsvadym.shovkoplias2018-07-271-0/+11
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104388 Signed-off-by: Andriy Khulap <[email protected]> Acked-by: Rafael Antognolli <[email protected]>
* intel/compiler: fix lower conversions to account for predicationIago Toral Quiroga2018-07-271-1/+4
| | | | | | | | The pass can create a temporary result for the instruction and then moves from it to the original destination, however, if the original instruction was predicated, the mov has to be predicated as well. Reviewed-by: Jose Maria Casanova Crespo <[email protected]>
* radv: allocate enough space in radv_cmd_buffer_after_draw()Samuel Pitoiset2018-07-271-0/+2
| | | | | | | | The driver might emit up to 4 dwords when RADV_TRACE_FILE is used. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: check CS space in radv_emit_write_data_packet()Samuel Pitoiset2018-07-271-14/+12
| | | | | | | | This wasn't wrong but it looks better to me like this. It's only used for debugging purposes (ie. RADV_TRACE_FILE). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not emit pipeline stats flushes on compute queueSamuel Pitoiset2018-07-271-1/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reduce CB/DB meta flushes in radv_dst_access_flush()Samuel Pitoiset2018-07-271-8/+23
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix buildKenneth Graunke2018-07-261-1/+1
| | | | | | I renamed this pass and forgot to update radv. Fixes: 488972222c6454551ab1559f753c13a493dc513f ("i965: Combine both gl_PatchVerticesIn lowering passes.")
* i965: Combine both gl_PatchVerticesIn lowering passes.Kenneth Graunke2018-07-266-62/+84
| | | | | | | | | | | | | | | | | | Until now, we had separate passes for lowering gl_PatchVerticesIn to a statically known constant (for TES inputs when linked against a TCS), and a uniform in the other cases. Annoyingly, one had to be run before nir_lower_system_values, and the other afterward. This simplified the passes, but made life painful for the callers. This patch combines both into a single pass. If you give it a non-zero static count, it uses that. If you give it Mesa state slots, it turns it back into a built-in uniform. Otherwise, it does nothing. This also moves the i965 uniform lowering out to shared code. v2: Make token arrays const. Reviewed-by: Eric Anholt <[email protected]>
* i965: Expose EXT_base_instance extension in OpenGLES 3.0Sagar Ghuge2018-07-261-1/+1
| | | | | | | | | | | | | | The extension requires at least OpenGL 3.0 and OpenGL ES 3.0. Fixes two ext_base_instance tests: arb_base_instance-baseinstance-doesnt-affect-gl-instance-id_gles3 arb_base_instance-drawarrays_gles3 Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* radv: Add support for ETC2 textures.Bas Nieuwenhuizen2018-07-273-11/+49
| | | | | | Was surprised that is even supported by Vega. Reviewed-by: Samuel Pitoiset <[email protected]>
* clover: Reduce wait_count in abort path.Jan Vesely2018-07-261-1/+3
| | | | | | | | | | Trigger waiter condition variable. Passes 'events' CTS on carrizo and turks. v2: reduce to 0 Cc: [email protected] Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Don't extend illegal integer types.Jan Vesely2018-07-262-2/+13
| | | | | | | | | | | | | | | | | It's OK to pass them in memory, which is what kernel invocation needs. Fixes regressions since llvm r337535 ("Reapply "AMDGPU: Fix handling of alignment padding in DAG argument lowering"): scalar-arithmetic-char scalar-arithmetic-uchar scalar-arithemtic-short scalar-arithmetic-ushort scalar-comparison-char scalar-comparison-uchar scalar-comparison-short scalar-comparison-ushort Cc: [email protected] Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* intel/compiler: Delete dead VS intrinsic handling.Kenneth Graunke2018-07-261-12/+4
| | | | | | | These are lowered by brw_nir_lower_vs_inputs(). If they weren't, we would have already hit the unreachable() in emit_system_values_block(). Reviewed-by: Jason Ekstrand <[email protected]>
* v3d: Avoid the GFXH-1461 workaround if we have only Z or only S.Eric Anholt2018-07-261-4/+6
| | | | | | This seems like a sensible precaution to avoid extra draws. It doesn't deal with the case of a Z24S8 buffer created by the window system for an application that happens to never use S.
* v3d: Rework the ordering of how we clear things.Eric Anholt2018-07-261-31/+54
| | | | | | | | | First, figure out if we can just sneak the clear into the TLB clear, even if drawing has already happened (since we have job->load and job->clear to tell us), taking into account GFXH-1461. For any pieces we can't TLB clear, fall back to drawing a quad without flushing the scene. Fixes extra scene flushes in glmark2 due to GFXH-1461.
* v3d: Only store buffers that have been written to.Eric Anholt2018-07-261-3/+9
| | | | | I've seen cases where a color buffer is bound, but only Z is written, and we end up storing color.
* v3d: Track the buffers being loaded separately.Eric Anholt2018-07-263-1/+8
| | | | | | We were computing this at RCL generation time, but that means you can't unflag the store for an invalidate_resource, or not flag the store if writmasking is disabled.
* v3d: Rename cleared/resolve to clear/store.Eric Anholt2018-07-265-35/+35
| | | | | | These describe what the fields mean in RCL generation. "resolve" is left over from VC4, and sounds like MSAA resolves (which may or may not be involved in the store we generate).
* nir: Add flipping of gl_PointCoord.y in nir_lower_wpos_ytransform.Eric Anholt2018-07-263-0/+33
| | | | | | | This is controlled by a new nir_shader_compiler_options flag, and fixes dEQP-GLES3.functional.shaders.builtin_variable.pointcoord on V3D. Reviewed-by: Kenneth Graunke <[email protected]>
* anv: drop unused local varsEric Engestrom2018-07-261-6/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: remove incorrect `UNUSED` flagEric Engestrom2018-07-261-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* gallium: initialize ureg_dst::Invariant bitErik Faye-Lund2018-07-261-0/+3
| | | | | | | | | | | | | | | | | | | | | When this bit was added, it seems the some initialization code was omitted by mistake. Since stack-variables have kinda random contents, and we don't zero initialize the whole struct in these code-paths, we end up getting random-ish values for this bit. Spotted by Coverity in the following CIDs: - 1438115 - 1438123 - 1438130 Fixes: 70425bcfe63c4e9191809659d019ec4af923595d ("gallium: plumb invariant output attrib thru TGSI") Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: fix adjusting vertex fetches since 16bit supportSamuel Pitoiset2018-07-261-3/+4
| | | | | | | | | | | Move the integer conversion after the fixup. This fixes some regressions with dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10* Fixes: b722b29f10 ("radv: add support for 16bit input/output") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: remove wrong assertion in print_var_decl()Samuel Pitoiset2018-07-261-1/+0
| | | | | | | | | This breaks printing input/output variables with more than 4 components like mat4. Fixes: 1beef89ad8 ("nir: prepare for bumping up max components to 16") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: fix typo DSL_SEL -> DST_SELMarek Olšák2018-07-263-6/+6
|
* radeonsi: update a comment about cache behaviorMarek Olšák2018-07-261-3/+3
|
* intel: Make the decoder just store addresses for bases, not buffers.Kenneth Graunke2018-07-252-12/+12
| | | | | | | | | | The various base addresses are simply addresses. There may or may not be a buffer located at those addresses. So, it doesn't make much sense to request one. Just save the raw address so we can add it later, when asking about BOs at the final <base + offset> address. Suggested-by: Lionel Landwerlin <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel: Make the decoder handle STATE_BASE_ADDRESS not being a buffer.Kenneth Graunke2018-07-252-38/+46
| | | | | | | | | | | | | | | | | | | | | | | | Normally, i965 programs STATE_BASE_ADDRESS every batch, and puts all state for a given base in a single buffer. I'm working on a prototype which emits STATE_BASE_ADDRESS only once at startup, where each base address is a fixed 4GB region of the PPGTT. State may live in many buffers in that 4GB region, even if there isn't a buffer located at the actual base address itself. To handle this, we need to save the STATE_BASE_ADDRESS values across multiple batches, rather than assuming we'll see the command each time. Then, each time we see a pointer, we need to ask the driver for the BO map for that data. (We can't just use the map for the base address, as state may be in multiple buffers, and there may not even be a buffer at the base address to map.) v2: Fix things caught in review by Lionel: - Drop bogus bind_bo.size check. - Drop "get the BOs again" code - we just get the BOs as needed - Add a message about interface descriptor data being unavailable Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: don't crash on vkDestroyDevice(NULL)Eric Engestrom2018-07-251-1/+3
| | | | | | | | CovID: 1438132 Fixes: a99c9e63a07477634ab73 "anv: finish the binding_table_pool on destroyDevice when use_softpin" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Maria Casanova Crespo <[email protected]>
* vulkan/wsi: fix incorrect assignment in assert()Eric Engestrom2018-07-251-2/+2
| | | | | | | CovID: 1438113, 1438118, 1438119, 1438121 Fixes: dc1d10b396179766227df "anv,radv: Add support for VK_KHR_get_display_properties2" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>