summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ac: fail shader compilation if libelf is replaced by an incompatible versionMarek Olšák2017-08-103-4/+15
| | | | | | | | | | | | UE4Editor has this issue. This commit prevents hangs (release build) or assertion failures (debug build). It doesn't fix the editor, but catastrophic scenarios are prevented. Cc: 17.1 17.2 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* dri: Introduce SWAP_METHOD tokensThomas Hellstrom2017-08-108-11/+23
| | | | | | | | | | | | We shouldn't be using GLX tokens in the dri subsystem, so define dri SWAP_METHOD tokens and translate when necessary. Unfortunately the X server uses the dri swap method value untranslated as the GLX fbconfig swapMethod, so we can't enumerate these tokens arbitrarily, but rather need to make them have the same values as the corresponding GLX tokens. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* glx: Fix swap method config matchingThomas Hellstrom2017-08-101-3/+1
| | | | | | | | | | Due to bugs in dri swap method reporting, neither the fbconfigs received from the server nor the value reported from driconfigs were correct. Now that's been fixed and we can enable config swapmethod matching again. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* glx: Work around X servers reporting bogus values of GLX_SWAP_METHOD_OMLThomas Hellstrom2017-08-101-1/+11
| | | | | | | | | | | | | | | Due to the recently fixed bug where dri drivers didn't report a correct __DRI_ATTRIB_SWAP_METHOD value, and the fact that X servers just forward this incorrect value (from the AIGLX dri driver) untranslated as GLX_SWAP_METHOD_OML, the latter value might be undefined when old dri AIGLX drivers are used, which breaks client fbconfig matching with server fbconfigs. So work around this by assuming GLX_SWAP_METHOD_UNDEFINED when a bogus value is read. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHODThomas Hellstrom2017-08-102-6/+2
| | | | | | | | | | | | | | The attribMap had two entries for this attribute, and driGetConfigAttribIndex didn't return a proper value for this attribute. Fix this, and also make sure we return SWAP_UNDEFINED for single-buffer configs as required by the GLX_OML_swap_method spec. Finally bump the dri core extension version to 2, indicating that we correctly report __DRI_ATTRIB_SWAP_METHOD. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radv: force cs/ps/l2 flush at end of command stream. (v2)Dave Airlie2017-08-091-1/+4
| | | | | | | | | | | | | | | | | | | | This seems like a workaround, but we don't see the bug on CIK/VI. On SI with the dEQP-VK.memory.pipeline_barrier.host_read_transfer_dst.* tests, when one tests complete, the first flush at the start of the next test causes a VM fault as we've destroyed the VM, but we end up flushing the compute shader then, and it must still be in the process of doing something. Could also be a kernel difference between SI and CIK. v2: hit this with a bigger hammer. This fixes a bunch of hangs in the vk cts with the robustness tests. Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101334 Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nv50/ir: fix ConstantFolding with saturationKarol Herbst2017-08-092-0/+9
| | | | | | | | | | | | | | | | | For mul(a, +-1) codegen can generate OP_MOV with a saturation flag set which is ignored at emission. The same can happen with add(a, 0), and others. Adding an assert for detecting more of such issues. Fixes wrongly rendered water in Hitman Absolution running under wine. Also a few shaders in Mad Max and Alien Isolation produce such MOVs. CC: <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> [imirkin: generalize the fix for other cases] Reviewed-by: Ilia Mirkin <[email protected]>
* st/dri2: fix kms_swrast driconf option handlingRob Herring2017-08-091-3/+3
| | | | | | | | | | | | | Commit e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") moved the option cache to the pipe_loader_device. However, the screen->dev pointer is not set when dri_init_options() is called. Move the call to after the pipe_loader_sw_probe_kms() call so screen->dev is set. This mirrors the code flow for dri2_init_screen(). Fixes: e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") Reviewed-by: Nicolai Hähnle <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radeonsi: drop two unused variables in create_function()Samuel Pitoiset2017-08-091-2/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: whitespace cleanup in eglapi.cEric Engestrom2017-08-091-25/+25
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* TextureStorage1D should return INVALID_OPERATION if target is not a 1D textureIago Toral Quiroga2017-08-091-1/+1
| | | | | | | | | | Previous behavior was inconsistent with other texture targets so this has been fixed in OpenGL 4.6. Fixes: KHR-GL45.direct_state_access.textures_storage_errors Reviewed-by: Jordan Justen <[email protected]>
* Update TextureParameter* error for incompatible texture targetsIago Toral Quiroga2017-08-091-1/+1
| | | | | | | | | | | The OpenGL 4.6 specs have been updated so that GetTextureParameter* with a texture object with an incompatible TEXTURE_TARGET should now report INVALID_OPERATION instead of INVALID_ENUM. Fixes: KHR-GL45.direct_state_access.textures_parameter_errors Reviewed-by: Jordan Justen <[email protected]>
* egl/dri2: refactor dri2_query_surface, swrastGetDrawableInfoTapani Pälli2017-08-091-7/+18
| | | | | | | | | | | | | | Currently swrastGetDrawableInfo always initializes w and h, patch refactors function as x11_get_drawable_info that returns success and sets the values only if no error happened. Add swrastGetDrawableInfo wrapper function as expected by DRI extension. v2: init w,y,w,h in swrastGetDrawableInfo (Eric) Signed-off-by: Tapani Pälli <[email protected]> Reported-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965/bufmgr: Set bo->idle after waiting.Kenneth Graunke2017-08-081-0/+2
| | | | | | | | | | After a successful wait, we know the buffer ought to be idle. Chris points out that: "The only caveat here is that bo is global, and we have a very unlikely (and probably unnoticeable) race condition with multiple contexts." Reviewed-by: Chris Wilson <[email protected]>
* i965: Don't use ggtt_bo for Gen8+ streamout offset buffer.Kenneth Graunke2017-08-081-1/+1
| | | | | | | RELOC_NEEDS_GGTT is only meaningful on Sandybridge - it's skipped on other generations - so this has no purpose. Just use rw_bo(). Reviewed-by: Chris Wilson <[email protected]>
* i965: Simplify *_bo() helpers.Kenneth Graunke2017-08-081-47/+25
| | | | | | | | With the reloc domains gone, most of these are basically the same, and the names don't make much sense anymore. Simplify them to ro_bo(), rw_bo(), and ggtt_bo(). Reviewed-by: Chris Wilson <[email protected]>
* i965: Get rid of KSP_roKenneth Graunke2017-08-081-15/+4
| | | | | | | | | The GPU reads the shader kernel from the program cache BO. It never writes it, so using a read-write BO reference makes no sense. Just make KSP read-only, and drop KSP_ro. Reviewed-by: Chris Wilson <[email protected]>
* ac/nir: fix saturate emissionConnor Abbott2017-08-081-2/+2
| | | | | | | The .f32 was already getting added by emit_intrin_2f_param(). Noticed when enabling LLVM module verification. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* i965: Only call create_for_planar_image for multiple planesJason Ekstrand2017-08-081-1/+4
| | | | | | | | | Before, we ended up always calling miptree_create_for_planar_image in almost all cases because most images have image->planar_format != NULL. This commit makes us only take that path if we have a multi-planar format. Reviewed-by: Daniel Stone <[email protected]>
* mesa: don't error check the default buffer objectTimothy Arceri2017-08-081-11/+11
| | | | | | | An allocation check is already done when the buffer is created at context creation. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: check default buffer object creation was successfulTimothy Arceri2017-08-081-0/+9
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add NULL checking to free_shared_state()Timothy Arceri2017-08-082-31/+65
| | | | | | | | This will allow us to call this function from _mesa_alloc_shared_state() in the case that we run out of memory part way through allocating the state. Reviewed-by: Samuel Pitoiset <[email protected]>
* glapi: per the extension spec, the EXT-suffixed function should be usedIlia Mirkin2017-08-071-10/+0
| | | | | | | | We already expose glMultiDrawElementsBaseVertexEXT as part of the EXT_draw_elements_base_vertex chunk, so this one can just be removed. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* radv: remove semicolon in if(...);Bas Nieuwenhuizen2017-08-081-1/+1
| | | | | | Trivial. Fixes: a6a6146aa91 "radv: Don't allow fmask swizzling for shareable images."
* radv: Fix decompression on multisampled depth buffersAlex Smith2017-08-072-35/+69
| | | | | | | | | | Need to take the sample count into account in the depth decompress and resummarize pipelines and render pass. Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]>
* radv: Don't allow fmask swizzling for shareable images.Bas Nieuwenhuizen2017-08-071-1/+4
| | | | | | | | Also adds an assert because you never know how the winsys changes, and multiprocess format differences are annoying. Fixes: 1e696b962b7 "radv: add separate fmask tile swizzle counter." Reviewed-by: Dave Airlie <[email protected]>
* radeonsi: fix a compile failure due to disabled assertsMarek Olšák2017-08-071-1/+1
|
* radeonsi: use optimal packet order when doing a pipeline syncMarek Olšák2017-08-071-34/+83
| | | | | | | | | | | | Process most new SET packets in parallel with previous draw calls, then flush caches and wait, start the draw, and do L2 prefetches last. This decreases the [CP busy / SPI busy] ratio (verified with GRBM perf counters). In other words, the time window when shaders are idle (between (the wait and the draw) is much shorter now. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: expose the number of decompress calls to the HUDMarek Olšák2017-08-074-7/+20
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: rename GPU-dma-busy -> GPU-cp-dma-busyMarek Olšák2017-08-074-8/+8
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: rename shader_userdata -> shader_pointers where appropriateMarek Olšák2017-08-075-20/+20
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: prefetch VBO descriptors after the first VGT shaderMarek Olšák2017-08-071-17/+63
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a separate dirty mask for prefetchesMarek Olšák2017-08-076-16/+64
| | | | | | | | | | so that we don't rely on si_pm4_state_enabled_and_changed, allowing us to move prefetches after draw calls. v2: ckear the dirty mask after unbinding shaders Tested-by: Dieter Nützel <[email protected]> (v1) Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radeonsi: add and use si_pm4_state_enabled_and_changedMarek Olšák2017-08-073-17/+18
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: de-atomize L2 prefetchMarek Olšák2017-08-077-9/+11
| | | | | | | I'd like to be able to move the prefetch call site around. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: align all CE dumps to L2 cache line sizeMarek Olšák2017-08-071-8/+17
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove a tautology sctx->framebuffer.nr_samples >= 1Marek Olšák2017-08-071-2/+1
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: print all members of radeon_info with R600_DEBUG=infoMarek Olšák2017-08-072-3/+15
| | | | | | | also set max_alignment on amdgpu. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: update the extensions/functions that are enabled for 460Samuel Pitoiset2017-08-072-17/+99
| | | | | | | | Other ones are either unsupported or don't have any helper function checks. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* egl/dri2: add image extension such it's usable by swrast driverGurchetan Singh2017-08-073-2/+5
| | | | | | | | | | | | | | | | | | Otherwise, this extension is not visible to the EGL users who use the swrast driver. This will allow the swrast driver to use eglCreateImageKHR, provided the target is EGL_GL_TEXTURE_2D_KHR or EGL_GL_RENDERBUFFER_KHR. Note we still have to implement the create from render buffer path. v2: add it to optional_core_extensions instead of swrast_core_extensions, so it's not a requirement (Emil) v3: Merge egl/dri2 changes together, also add support for platform_wayland (Emil) Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v2)
* st/dri: add drisw image extensionGurchetan Singh2017-08-071-0/+11
| | | | | | | | | Since the revelant functions have been moved to dri_helpers, drisw.c can make use of the extension. Note we have version 6 of the extension, since we want to support createImageFromTexture. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: move some image functions to dri_helpers.cGurchetan Singh2017-08-073-106/+124
| | | | | | | | | These functions will be used both by drisw.c and dri2.c. This patch also moves some headers that can be shared. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: organize order of includers in dri_helpersGurchetan Singh2017-08-071-2/+3
| | | | | | | | Although it doesn't seem like a strict requirement of the code base, we do it when possible and it looks nice. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: change dri_extensions to dri_helpersGurchetan Singh2017-08-075-6/+6
| | | | | | | | These files provide helper structs and functions for dri2.c and drisw.c, and name change better conveys that. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965/miptree: Set supports_fast_clear = false in make_shareableJason Ekstrand2017-08-071-0/+1
| | | | | | | | | | | | The make_shareable function deletes the aux buffer and then whacks aux_usage to ISL_AUX_USAGE_NONE but not unsetting supports_fast_clear. Since we only look at supports_fast_clear to decide whether or not to do fast clears, this was causing assertion failures. Reported-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101925 Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* i965/miptree: Rework create flagsJason Ekstrand2017-08-078-38/+52
| | | | | | | | | The only one of the three remaining flags that has anything whatsoever to do with layout is TILING_NONE. This commit renames them to MIPTREE_CREATE_*, documents the meaning of each flag, and makes the create functions take an actual enum type so GDB will print them nicely. Reviewed-by: Jordan Justen <[email protected]>
* i965/miptree: Delete MIPTREE_LAYOUT_TILING_(Y|ANY)Jason Ekstrand2017-08-076-24/+8
| | | | | | | The only force tiling flag we really care about is LAYOUT_TILING_NONE. The others don't actually do anything but add confusion. Reviewed-by: Jordan Justen <[email protected]>
* i965/miptree: Delete an unused function declarationJason Ekstrand2017-08-071-5/+0
| | | | | | The implementation of brw_miptree_layout was removed in bf24c3539e4b69. Reviewed-by: Jordan Justen <[email protected]>
* i965/miptree: Call alloc_aux in create_for_boJason Ekstrand2017-08-071-6/+7
| | | | | | | | | | | | Originally, I had moved it to the caller to make some things easier when adding the CCS modifier. However, this broke DRI2 because intel_process_dri2_buffer calls intel_miptree_create_for_bo but never calls intel_miptree_alloc_aux. Also, in hindsight, it should be pretty easy to make the CCS modifier stuff work even if create_for_bo allocates the CCS when DISABLE_AUX is not set. Reviewed-by: Jordan Justen <[email protected]> Cc: "17.2" <[email protected]>
* i965/miptree: Delete MIPTREE_LAYOUT_FOR_SCANOUTJason Ekstrand2017-08-073-7/+15
| | | | | | | | | The flag hasn't affected actual surface layout for some time. The only purpose it served was to set bo->cache_coherent = false on the BO used to create the miptree. This is fairly silly because we can just set that directly from the caller where it makes much more sense. Reviewed-by: Jordan Justen <[email protected]>