summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-01-02more debug infometa-cannot-use-Gen-v2017.12Ian Romanick2-5/+13
2018-01-02i965/miptree: Fail gracefully when make_surface returns NULLIan Romanick1-0/+3
Every other caller of make_surface does something sensible when NULL is returned. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104214
2018-01-02meta: Don't pollute the texture namespaceIan Romanick2-29/+10
tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta: Use _mesa_bind_texture instead of _mesa_BindTextureIan Romanick2-5/+5
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta: Use _mesa_CreateTextures instead of _mesa_GenTexturesIan Romanick1-1/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta: Track temporary textures using gl_texture_object instead of GL API ↵Ian Romanick3-17/+36
object handle Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Track temporary texture using gl_texture_object instead of GL API ↵Ian Romanick2-7/+7
object handle Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Use _mesa_bind_texture instead of _mesa_BindTextureIan Romanick1-1/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Don't bind texture in _mesa_meta_bind_rb_as_tex_imageIan Romanick2-7/+6
All of the callers of _mesa_meta_bind_rb_as_tex_image call _mesa_meta_setup_sampler shortly after. _mesa_meta_setup_sampler also binds the texture. This is necessary because not all paths that lead to _mesa_meta_setup_sampler some through _mesa_meta_bind_rb_as_tex_image. Rename the function _mesa_meta_texture_object_from_renderbuffer to reflect its true purpose. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Track source texture using gl_texture_object instead of GL API ↵Ian Romanick2-0/+2
object handle Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Since _mesa_meta_bind_rb_as_tex_image has only one output, return itIan Romanick2-14/+14
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Don't return the texture handle from _mesa_meta_bind_rb_as_tex_imageIan Romanick2-9/+7
It's always the same as *texObj->Name. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Don't return the target from _mesa_meta_bind_rb_as_tex_imageIan Romanick2-14/+10
It's always the same as *texObj->Target. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Don't restore state of the temporary textureIan Romanick1-21/+27
It's about to be destroyed, so there's no point. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02meta/blit: Check the values instead of the target before restoringIan Romanick1-2/+6
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02mesa: Add _mesa_bind_texture methodIan Romanick2-2/+26
Light-weight glBindTexture for internal use. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-02Revert "mesa: remove unused _mesa_delete_nameless_texture()"Ian Romanick2-0/+46
Changes in this series use this function. This reverts commit 048de9e34a2214371481143cddcaa53f52468c6b. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Cc: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: Timothy Arceri <tarceri@itsqueeze.com>
2018-01-02mesa: Fold _mesa_record_error into its only callerIan Romanick3-30/+2
Also, the comment on _mesa_record_error was wrong. dd_function_table::Error was not called because that function does not exist. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-01-01etnaviv: disable in-place resolve for non-supertiled surfacesLucas Stach1-0/+1
The in-place resolve probably has some additional restrictions when not operating on a super tiled surface. Disable it on non-supertiled surfaces for now to work around a GPU hang. Fixes: 78ade659569e ("etnaviv: Do GC3000 resolve-in-place when possible") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-12-31radv: Implement binning on GFX9.Bas Nieuwenhuizen4-6/+348
Overall it does not really help or hurt. The deferred demo gets 1% improvement and some games a 3% decrease, so I don't think this should be enabled by default. But with the code upstream it is easier to experiment with it. v2: Remove initializing the registers from si_emit_config. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-31radv: Add flag for enabling binning.Bas Nieuwenhuizen2-0/+9
Letting it be disabled by default. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-30i965: Combine {VS,FS}_OPCODE_GET_BUFFER_SIZE opcodes.Kenneth Graunke8-19/+14
These are the same, we don't need a separate opcode enum per backend. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-12-30nir: add missing local_group_size intrinsicRob Clark2-0/+5
For GL_ARB_compute_variable_group_size Reported-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-12-29nv50/ir: Fix unused var warnings in release buildRhys Kidd2-2/+4
v2: Add preventative comment (Ilia Mirkin) Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2017-12-29nvc0: Fix unused var warnings in release buildRhys Kidd1-3/+4
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2017-12-29nv50: Fix unused var warning in release buildRhys Kidd1-1/+2
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
2017-12-30r600: fix textureSize queries with tbosRoland Scheidegger2-24/+33
piglit doesn't care, but I'm quite confident that the size actually bound as range should be reported and not the base size of the resource (and some quick piglit test hacking confirms this). Also, the array in the constant buffer looks overallocated by a factor of 4. For eg, also decrease the size by another factor of 2 by using the same constant slot for both buffer size (required for txq for TBOs) and the number of layers for cube arrays, as these are mutually exclusive. Could of course use some more logic and only actually do this for the samplers/images/buffers where it's required rather than for all, but ah well... Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-30r600: kill off native_integer shader ctx flagRoland Scheidegger1-18/+0
Maybe upon a time it wasn't always true. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv: Also set DCC params for sampling for input attachment usage.Bas Nieuwenhuizen1-1/+2
Those are implemented as texture sampling, so we need to make the texture TC-compatible too. Fixes: 34d23e82ca9 "radv: set some dcc parameters depending on if texture will be sampled" Reviewed-by: Fredrik Höglund <fredrik@kde.org>
2017-12-29radv: Enable DCC with transfers.Bas Nieuwenhuizen1-2/+1
Before this DCC was in practice disabled for most games. This enables practical DCC use. Expect a 5-10% perf increase on a bunch of games on vega @ 4k. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Decompress copy destination if formats are incompatible.Bas Nieuwenhuizen1-2/+25
If both source and destination are DCC compressed, and their formats are not compatible, we need to decompress one of them to make sure we can do reinterpretation (which needs src format == dst format) . Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Disable DCC for GENERAL layout and compute transfer dest.Bas Nieuwenhuizen4-8/+47
Apps can use this for render feedback loops, where things are defined if they render each pixel only once. However, DCC fails here, as the level of coherence is a block not a pixel, so disable it. This is also going to help implementing other stuff. Even if we optimize this later to only happen if there actually is a loop (if possible at all ...), then the machinery is still useful to exclude images accessible by the SDMA queue when that is implemented. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Don't init DCC metadata during FS resolve.Bas Nieuwenhuizen1-5/+0
It should already be valid there + the RB will update it during rendering. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Make color meta operations layout aware.Bas Nieuwenhuizen5-110/+145
For fast clear eliminate and decompressions, we always use the most compressed format. For clears, the code already creates a renderpass on demand with the exact same layout as specified. Otherwise we start distinguishing between GENERAL and TRANSFER_DST_OPTIMAL. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Add compute DCC decompress.Bas Nieuwenhuizen3-0/+275
We do an in place copy where we read compressed and write decompressed. By doing this in sizes that cover entire DCC blocks and waiting for all reads in the block before starting to write we avoid corruption. In the end we clear the DCC metadata to 0xffffffff. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Use the meta fast clear destructor on construction failure.Bas Nieuwenhuizen1-6/+3
Simplifies failure paths. The caller already calls radv_device_finish_meta_fast_clear_flush_state on failure. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Add GFX DCC decompress.Bas Nieuwenhuizen2-12/+83
Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29radv: Don't enable DCC / TC compat HTILE for storage images.Bas Nieuwenhuizen1-5/+6
We don't get a layout when binding to a descriptor set, but can assume that the LAYOUT is GENERAL. For DCC stores with the DCC bits set will result in a hang, so better be safe than sorry. Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-12-29Revert "radv/gfx9: fix block compression texture views."Bas Nieuwenhuizen1-35/+0
This reverts commit 59515780433837ad3975f8ed20b93cf2fe6870e5. The mentioned commit causes a hang in DoW3 on Vega. Fixes: 59515780433 "radv/gfx9: fix block compression texture views." Acked-by: Dave Airlie <airlied@redhat.com>
2017-12-28svga: update SVGA_NEW_ flags for updating sampler stateBrian Paul1-3/+4
The SVGA_NEW_FS flag is needed since we now examine the fragment shader's fs_shadow_compare_units flags. The SVGA_NEW_TEXTURE_FLAGS flag is not needed since it's only for pre-VGPU10. No piglit changes. This doesn't fix any known issues but it could pop up somewhere. Suggested by Charmaine. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2017-12-28svga: whitespace, formatting fixes in svga_state_tss.cBrian Paul1-34/+21
2017-12-29radv/gfx9: use correct swizzle parameter to work out border swizzle.Dave Airlie1-2/+2
This should fix: dEQP-VK.pipeline.sampler.view_type.*.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black and a few others in that area. Fixes: b11c4a5546 (radv: add texture descriptor/fmask/cmask support for GFX9) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv/gfx9: use a bigger hammer to flush cb/db caches.Dave Airlie1-1/+8
amdvlk is probably more subtle than this but it never uses the inv cb/db variants, we fail some CTS tests without this. Fixes: dEQP-VK.renderpass.dedicated_allocation.formats.d32_sfloat_s8_uint.input*. Fixes: c2fbeb7ca05 (radv: add GFX9 cache flushing support.) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (for now :-) Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv/gfx9: fix block compression texture views.Dave Airlie1-0/+35
This ports a fix from amdvlk, to fix the sizing for mip levels when block compressed images are viewed using uncompressed views. Fixes: dEQP-VK.image.texel_view_compatible.graphic.extended*bc* Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."' Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv/gfx9: fix buffer to image for 3d images on compute queuesDave Airlie2-15/+48
This fixes some of the broken: dEQP-VK.synchronization.op.multi_queue.*64x64x8* tests. Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."' Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv/gfx9: fix 3d image clears on compute queuesDave Airlie2-9/+65
This fixes some of the broken: dEQP-VK.synchronization.op.multi_queue.*64x64x8* tests. Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."' Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-29radv/gfx9: fix 3d image to image transfers on compute queues.Dave Airlie2-20/+56
This fixes some of the broken: dEQP-VK.synchronization.op.multi_queue.*64x64x8* tests. Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."' Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-12-28anv/device: Mark all state buffers as needing captureJason Ekstrand1-3/+3
Previously, we were flagging the instruction state buffer for capture but not surface state or dynamic state. We want those captured too. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-12-28intel/aubinator: Gracefully handle dynamic state not being availableJason Ekstrand1-0/+5
Some older versions of the Vulkan driver didn't properly tag dynamic state as needing to be captured. Also, this prevents crashes when looking at dumps on older kernels. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-12-28intel/aubinator: Free section data lastJason Ekstrand1-2/+4
We were walking the sections, printing the batches, and then freeing them in one pass. If the batch happens to reference any earlier sections (which it almost certainly will since it's at the end), we will access freed memory. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>