aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* r600: fix warnings when unref'ing pool->boMarek Olšák2018-07-171-3/+3
|
* r600g: some -Wsign-compare fixesKonstantin Kharlamov2018-07-176-14/+13
| | | | | Signed-off-by: Konstantin Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/glx: constify some variablesKonstantin Kharlamov2018-07-171-1/+1
| | | | | | | Just a nice hint for both peoples and compilers. Signed-off-by: Konstantin Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/nine: constify some variablesKonstantin Kharlamov2018-07-172-6/+6
| | | | | | | Just a nice hint for both peoples and compilers. Signed-off-by: Konstantin Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: constify some variablesKonstantin Kharlamov2018-07-175-10/+10
| | | | | | | Just a nice hint for both peoples and compilers. Signed-off-by: Konstantin Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: do not use "fast-clear" for small textures (v3)Konstantin Kharlamov2018-07-171-0/+10
| | | | | | | | | | | | | | | | | | | | Ported from radeonsi. Improves windowed glxgears ran as vblank_mode=0 glxgears -info -geometry 0+0+512+512 from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS. v2: turned out glxgears ignores the option above, the correct way would be "512x512+0+0". Now it can be seen 512x512 actually loses 30 FPS. 300×300 however wins around a hundred FPS, and to leave some room in case results may differ for other cards I want not to nitpick in search of an optimum but to simply leave 300×300 in the code. v3: remove redundant braces, and try harder for the mail to stick to the rest of the series. Signed-off-by: Konstantin Kharlamov <[email protected]> Reviewed-by: Gert Wollny <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* freedreno: re-work fd_batch_reference() lockingRob Clark2018-07-172-23/+26
| | | | | | | | Annoyingly we still have to briefly drop the lock to unref resources.. but push the lock down into __fd_batch_destroy() so we can invalidate the batch and reset resources before dropping the lock. Signed-off-by: Rob Clark <[email protected]>
* freedreno: make fd_batch a one-shot thingRob Clark2018-07-172-11/+36
| | | | | | | | | | | | | Re-allocate rather than re-use. Originally we had an unnecessarily complex design to avoid re-allocating cmdstream buffers. But now that support for "growable" cmdstream buffers has been in place for a couple years, I guess we can care a bit less about the extra overhead on older kernels. But making the batches one-shot removes a class of potential race conditions vs the flush_queue. Signed-off-by: Rob Clark <[email protected]>
* freedreno: flush immediately when reading a pending batchRob Clark2018-07-172-30/+32
| | | | | | | | Instead of the reading batch setting a dependency on the writing batch, simply flush the writing batch immediately. This avoids situations where we have to flush the context's current batch later. Signed-off-by: Rob Clark <[email protected]>
* freedreno: get rid of noop renderRob Clark2018-07-174-21/+6
| | | | | | | This was basically to avoid a zero-dword IB (indirect-branch), but instead just don't emit the IB packet in that case. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix samples=0 vs samples=1 confusionRob Clark2018-07-171-1/+1
| | | | | | | | | pipe_framebuffer_state can have samples=0 in various cases, which is actually the same thing as samples=1. So use the _get_num_samples() helper to populate the key, to avoid this looking like two distinct fb states to the cache. Signed-off-by: Rob Clark <[email protected]>
* freedreno: comment for _invalidate_batch()Rob Clark2018-07-171-3/+13
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: hold batch references when flushingRob Clark2018-07-171-32/+38
| | | | | | | It is possible for a batch to be freed under our feet when flushing, so it is best to hold a reference to all of them up-front. Signed-off-by: Rob Clark <[email protected]>
* nir/spirv: print id for unsupported alu opcodeKarol Herbst2018-07-171-1/+1
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir: prepare for bumping up max components to 16Karol Herbst2018-07-1713-53/+57
| | | | | | | | | | | OpenCL knows vector of size 8 and 16. v2: rebased on master (nir_swizzle rework) rework more declarations with nir_component_mask_t adjust print_var_decl Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* radv/winsys: use alloca() for semaphore dependenciesSamuel Pitoiset2018-07-171-6/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reduce number of CB/DB meta flushes for VK_ACCESS_TRANSFER_WRITE_BITSamuel Pitoiset2018-07-171-6/+14
| | | | | | | | If we know that the given image doesn't have any metadata, we don't need to flush. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: fix implementation of VK_KHR_create_renderpass2 for multiviewsSamuel Pitoiset2018-07-171-12/+1
| | | | | | | | | | | The Vulkan 1.1.80 spec says: "viewMask has the same effect for the described subpass as VkRenderPassMultiviewCreateInfo::pViewMasks has on each corresponding subpass." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* virgl: respect max_vertex_attrib_stride capErik Faye-Lund2018-07-173-2/+5
| | | | | | This is required for OpenGL 4.4 and OpenGL ES 3.1 support. Reviewed-by: Dave Airlie <[email protected]>
* virgl: Fix flush in virgl_encoder_inline_write.Lepton Wu2018-07-171-1/+1
| | | | | | | | | The current code is buggy: if there are only 12 dwords left in cbuf, we emit a zero data length command which will be rejected by virglrenderer. Fix it by calling flush in this case. Cc: [email protected] Reviewed-by: Dave Airlie <[email protected]>
* virgl: implement set_min_samplesErik Faye-Lund2018-07-175-0/+28
| | | | | | | | This allows us to implement glMinSampleShading correctly, which up until now just got ignored. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* glsl: do second pass of const propagation in loopsCaio Marcelo de Oliveira Filho2018-07-161-6/+23
| | | | | | | | | | | | | When handling loops in constant propagation, implement the "FINISHME" comment like copy propagation: perform a first pass to find values that can't be propagated, then perform a second pass with the ACP containing still valid values. Certain values are killed because the loop may run more than one iteration, so we can't copy propagate them as they would be invalid in the later iterations. Reviewed-by: Eric Anholt <[email protected]>
* glsl: don't let an 'if' then-branch kill const propagation for else-branchCaio Marcelo de Oliveira Filho2018-07-161-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling 'if' in constant propagation, if a certain variable was killed when processing the first branch of the 'if', then the second would get any propagation from previous nodes. This is similar to the change done for copy propagation code. x = 1; if (...) { z = x; // This would turn into z = 1. x = 22; // x gets killed. } else { w = x; // This would NOT turn into w = 1. } With the change, we let constant propagation happen independently in the two branches and only then apply the killed values for the subsequent code. The new code use a single hash table for keeping the kills of both branches (the branches only write to it), and it gets deleted after we use -- instead of waiting for mem_ctx to collect it. NIR deals well with constant propagation, so it already covered for the missing ones that this patch fixes. Reviewed-by: Eric Anholt <[email protected]>
* v3d: Disable shader-db cycle estimates until we sort out TMU estimates.Eric Anholt2018-07-161-1/+4
| | | | | I keep having to ignore these shader-db changes since I don't trust them, so just disable the reports entirely.
* v3d: Emit the lowered uniform just before its first use in a block.Eric Anholt2018-07-161-20/+18
| | | | | | | | total instructions in shared programs: 98578 -> 98119 (-0.47%) instructions in affected programs: 27571 -> 27112 (-1.66%) and it also eliminates most spills/fills on the CTS's randomized uniform usage testcases.
* v3d: Add an assert that we don't provide an invalid texture return words.Eric Anholt2018-07-161-0/+8
| | | | The docs had an update noting this restriction, so reflect it in the code.
* v3d: Apply GFXH-1625 restriction on TMUWT in the end of the shader.Eric Anholt2018-07-161-0/+4
| | | | | This doesn't affect us yet since we're not doing TMUWTs, but I think we will for GLES 3.1.
* intel/batch_decoder: decoding of 3DSTATE_CONSTANT_BODY.Sergii Romantsov2018-07-162-30/+20
| | | | | | | | | | | | | | SNB doesn't have a definition of 3DSTATE_CONSTANT_BODY, thats why we got segmentation fault when used INTEL_DEBUG=bat. Fixed by adding of 3DSTATE_CONSTANT_BODY into 3DSTATE_CONSTANT of VS, GS and PS structures. v2: added definition of 3DSTATE_CONSTANT_BODY to the gen6.xml Fixes: 169d8e011ae (intel: Fix 3DSTATE_CONSTANT buffer decoding.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107190 Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600: fix build after the removal of RADEON_PRIO_* flagsMarek Olšák2018-07-167-21/+12
|
* nir: fix msvc buildRoland Scheidegger2018-07-161-1/+1
| | | | | | | | Empty initializer braces aren't valid c (it's a gnu extension, and it's valid in c++). Hopefully fixes appveyor / msvc build... Fixes a3150c1d06ae7766c3d3fe3b33432e55c3c7527e
* nir/worklist: Rework the foreach macroJason Ekstrand2018-07-162-4/+3
| | | | | | | | | This makes the arguments match the (thing, container) pattern used in other nir_foreach macros and also renames it to make that a bit more clear. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: tools: Fix uninitialized variable warnings in intel_dump_gpu.Eric Anholt2018-07-161-0/+2
| | | | Reviewed-by: Rafael Antognolli <[email protected]>
* spirv: Fix a couple of image atomic load/store bugsJason Ekstrand2018-07-161-17/+30
| | | | | | | | | | For one thing, the NIR opcodes for image load/store always take and return a vec4 value regardless of the image type. We need to fix up both the source and destination to handle it. For another thing, we weren't actually setting up a destination in the OpAtomicLoad case. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: [email protected]
* winsys/amdgpu: clean up error handling in amdgpu_cs_submit_ibMarek Olšák2018-07-161-9/+8
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: rework RADEON_PRIO flags to be <= 31Marek Olšák2018-07-166-29/+30
| | | | | | This decreases sizeof(struct amdgpu_cs_buffer) from 24 to 16 bytes. Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: merge DCC/CMASK/HTILE priority flagsMarek Olšák2018-07-166-12/+8
| | | | | | For a later simplification. Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: remove non-GFX BO priority flagsMarek Olšák2018-07-168-19/+7
| | | | | | For a later simplification. Reviewed-by: Samuel Pitoiset <[email protected]>
* winsys/amdgpu: use alloca when using global_bo_listMarek Olšák2018-07-161-9/+1
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* winsys/amdgpu: remove label bo_list_errorMarek Olšák2018-07-161-12/+16
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* winsys/amdgpu: always update gfx_bo_list_counterMarek Olšák2018-07-161-3/+3
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* winsys/amdgpu: make amdgpu_cs_context::flags & handles localMarek Olšák2018-07-162-22/+5
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/virgl: Fix off-by-one and copy-paste error in multisample position ↵Gert Wollny2018-07-161-3/+3
| | | | | | | | | | | | | | | evaluation Converting from a switch statement that would not allow intermediate sample counts to use an if-else chain went a bit wrong, so that in some cases the range that should be inclusive was exclusive and the line for 16 samples was copies wrongly. v2: elaborate commit message. Fixes: 91f48cdfe5c817158c533a8f67c60e9aabbe4479 virgl: Add support for glGetMultisample Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> (v1)
* nouveau: fix 3D blitter for unsigned to signed integer conversionsKarol Herbst2018-07-152-10/+22
| | | | | | | | | fixes a couple of packed_pixel CTS tests. No regressions inside a CTS run. v2: simplify the changes a bit Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir: fix printing of vec16 typeKarol Herbst2018-07-151-0/+1
| | | | | | | | Fixes: 2f181c8c183cc8b4d0450789bb20c2be48d32db3 "glsl_types: vec8/vec16 support" Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir/spirv: implement BuiltInWorkDimRob Clark2018-07-155-0/+9
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir/spirv: print id for unsupported builtinsKarol Herbst2018-07-151-1/+1
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* intel/blorp: Handle 3-component formats in clearsJason Ekstrand2018-07-133-11/+92
| | | | | | | | This fixes a nasty hang in Batman: Arkham City which apparently calls vkCmdClearColorImage on a linear RGB image. cc: [email protected] Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* intel/blorp: Fix blits to R8G8B8_UNORM_SRGBJason Ekstrand2018-07-131-0/+4
| | | | | | | | In this case, the surface faking will give us a R8_UNORM surface and we need to do an sRGB conversion in the shader. Found by inspection. cc: [email protected] Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* util/hash_table: add helper to remove entry by keyCaio Marcelo de Oliveira Filho2018-07-136-1/+78
| | | | | | And the corresponding test case. Reviewed-by: Eric Anholt <[email protected]>
* nir/lower_tex: Use nir_format_srgb_to_linearJason Ekstrand2018-07-131-18/+3
| | | | | | | A while ago, we added a bunch of format conversion helpers; we should use them instead of hand-rolling sRGB conversions. Reviewed-by: Eric Anholt <[email protected]>