summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-12Remove missing one.cnl/fast_clear_address_v4Rafael Antognolli1-6/+0
2018-03-12intel: Remove use_clear_address flag from isl_surf_fill_state_info.Rafael Antognolli6-29/+13
This flag was used while porting parts of the code to use the clear color address, but other parts were not ported yet. So isl had to be flexible enough to support both cases. Now that the code is using exclusively clear color address for everything Gen10+, we don't need it anymore. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12anv: Make blorp update the clear color.Rafael Antognolli3-57/+66
Instead of updating the clear color in anv before a resolve, just let blorp handle that for us during fast clears. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12anv: Use clear address for HiZ fast clears too.Rafael Antognolli3-3/+27
Store the default clear address for HiZ fast clears on a global bo, and point to it when needed. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12anv: Emit the fast clear color address, instead of value.Rafael Antognolli3-4/+70
On Gen10+, instead of copying the clear color from the state buffer to the surface state, just use the address of the state buffer in the surface state directly. This way we can avoid the copy from state buffer to surface state. v4: - Remove use_clear_address from anv code. (Jason) - Use the helper to extract clear color from attachment (Jason) Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12anv: Add a helper to extract clear color from the attachment.Rafael Antognolli2-13/+21
Extract the code from color_attachment_compute_aux_usage, so we can later reuse it to update the clear color state buffer. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12i965/surface_state: Emit the clear color address instead of value.Rafael Antognolli1-1/+28
On Gen10, when emitting the surface state, use the value stored in the clear color entry buffer by using a clear color address in the surface state. v4: Use the clear color offset from the clear_color_bo, when available. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12i965/blorp: Update the fast clear color address.Rafael Antognolli2-0/+33
On Gen10, whenever we do a fast clear, blorp will update the clear color state buffer for us, as long as we set the clear color address correctly. However, on a hiz clear, if the surface is already on the fast clear state we skip the actual fast clear operation and, before gen10, only updated the miptree. On gen10+ we need to update the clear value state buffer too, since blorp will not be doing a fast clear and updating it for us. v4: - do not use clear_value_size in the for loop - Get the address of the clear color from the aux buffer or the clear_color_bo, depending on which one is available. - let core blorp update the clear color, but also update it when we skip a fast clear depth. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12i965/blorp: Add aux_buf variable to simplify code.Rafael Antognolli1-12/+7
In a follow up patch, we make use of clear_color_bo, which is in mt->mcs_buf or mt->hiz_buf. To avoid duplicating more code that does the same thing on both aux buffers, just use aux_buf already. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12i965/miptree: Add new BO for clear color.Rafael Antognolli1-0/+18
Add an extra BO to store clear color when we receive the aux buffer from the window system. Since we have no control over the aux buffer size in this case, we need the new BO to store only the clear color. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12i965/miptree: Add space to store the clear value in the aux surface.Rafael Antognolli2-0/+32
Similarly to vulkan where we store the clear value in the aux surface, we can do the same in GL. v2: Remove unneeded extra function. v3: Use clear_value_state_size instead of clear_value_size. v4: - rename to clear_color_state_size - store clear_color_bo and clear_color_offset in the aux buf struct Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12intel/blorp: Update clear color state buffer during fast clears.Rafael Antognolli1-0/+48
We always want to update the fast clear color during a fast clear on i965. On anv, we doing that before a resolve, but by adding support to blorp, we can do a similar thing and update it during a fast clear instead. The goal is to remove some code from anv that does such update, and centralize everything in blorp, hopefully removing a lot of code duplication. It also allows us to have a similar behavior on gen < 9 and gen >= 10. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12intel/blorp: Only copy clear color when doing a resolve.Rafael Antognolli1-4/+9
We only need to copy the clear color from the state buffer to the inlined surface state when doing a resolve. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12intel/blorp: Add support for fast clear address.Rafael Antognolli1-3/+10
On gen10+, if surface->clear_color_addr is present, use it directly intead of copying it to the surface state. v4: Remove redundant #if clause for GEN <= 10 (Jason) Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-03-12intel/isl: Add support to emit clear value address.Rafael Antognolli2-4/+23
gen10 can emit the clear color by setting it on a buffer somewhere, and then adding only the address to the surface state. This commit add support for that on isl_surf_fill_state, and if that is requested, skip setting the clear value itself. v2: Add assert to make sure we are at least on gen10. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2018-03-12intel/genxml: Add Clear Color struct.Rafael Antognolli8-23/+63
The size of the clear color struct (expected by the hardware) is 8 dwords (isl_dev.ss.clear_value_state_size here). But we still need to track the size of the clear color, used when memcopying it to/from the state buffer. For that we keep isl_dev.ss.clear_value_size. v4: - Add struct to gen11 too (Jason, Jordan) - Add field for Converted Clear Color to gen11 (Jason) - Add clear_color_state_offset to differentiate from clear_value_offset. - Fix all the places where clear_value_size was used. [jordan.l.justen@intel.com: isl_device_init changes] Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2018-03-12intel/genxml: Use a single field for clear color address on gen10.Rafael Antognolli2-8/+6
genxml does not support having two address fields with different names but same position in the state struct. Both "Clear Color Address" and "Clear Depth Address Low" mean the same thing, only for different surface types. To workaround this genxml limitation, rename "Clear Color Address" to "Clear Value Address" and use it for both color and depth. Do the same for the high bits. TODO: add support for multiple addresses at the same position in the xml. v2: Combine high and low order bits into a single address field. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2018-03-12genxml: Preserve fields that share dword space with addresses.Rafael Antognolli1-2/+7
Some instructions contain fields that are either an address or a value of some type based on the content of other fields, such as clear color values vs address. That works fine if these fields are in the less significant dword, the lower 32 bits of the address, because they get OR'ed with the address. But if they are in the higher 32 bits, they get discarded. On Gen10 we have fields that share space with the higher 16 bits of the address too. This commit makes sure those fields don't get discarded. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-03-12anv/image: Do not override lower bits of dword.Rafael Antognolli1-13/+10
The lower bits seem to have extra fields in every platform but gen8 (even though we don't use them in gen9). So just go ahead and avoid using them for the address. v4: Use Jason's suggestion for comment explaining the change. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2018-03-13gallium: silence __builtin_frame_address nonzero argument is unsafe warningTimothy Arceri1-0/+3
Calling __builtin_frame_address with a nonzero argument is unsafe but is sometimes done for debugging purposes. Since this code is part of some debug util code I'm assuming that is the case here and using GCC pragma to silence the warning. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-03-12meson: Add moduledir to d3d.pcDylan Baker1-0/+1
This is required to build wine with the nine patchset Fixes: 6b4c7047d57178d3362a710ad503057c6a582ca3 ("meson: build gallium nine state_tracker") Reported-by: Mike Lothian <mike@fireburn.co.uk> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-12gallium: Use struct gl_array_attributes* as st_pipe_vertex_format argument.Mathias Fröhlich3-24/+11
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2018-03-12mesa: Don't write to user buffer in glGetTexParameterIuiv on errorIan Romanick1-26/+2
With some sets of optimization flags, GCC will generate warnings like this: src/mesa/main/texparam.c:2327:27: warning: ‘*((void *)&ip+12)’ may be used uninitialized in this function [-Wmaybe-uninitialized] params[3] = ip[3]; ~~^~~ src/mesa/main/texparam.c:2320:16: note: ‘*((void *)&ip+12)’ was declared here GLint ip[4]; ^~ ip is not initialized in cases where a GL error is generated. In these cases, we should *not* write to the user's buffer, so this is actually a bug. I wrote a new piglit test gl-3.0-texparameteri to show this bug. I suspect that Coverity also detected this, but the scan site is currently down. Fixes: c2c507786 "main: Added entry points for glGetTextureParameteriv, Iiv, and Iuiv." Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2018-03-12gallium: work around libtool relink issue for libdrmRoman Gilg1-1/+1
This is similar to commit 90633079. libtool links first to system directories instead of custom locations of libdrm on relinking. Since a more recent libdrm version than the one provided by the system is often needed when compiling mesa, make sure this works by putting libdrm in front. See also: https://bugs.freedesktop.org/show_bug.cgi?id=100259 Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-12vulkan: autotools: do not redirect stdin/stdout for wayland-scannerEmil Velikov1-4/+4
The tool accepts the input and output files as arguments. There's no need for the redirection. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-12wayland-drm: autotools: do not redirect stdin/stdout for wayland-scannerEmil Velikov1-3/+3
The tool accepts the input and output files as arguments. There's no need for the redirection. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-12egl: autotools: do not redirect stdin/stdout for wayland-scannerEmil Velikov1-2/+2
The tool accepts the input and output files as arguments. There's no need for the redirection. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-12docs: document removal of GLX_SGIX_swap_{barrier,group} stubsEmil Velikov1-1/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-12glx: remove empty GLX_SGIX_swap_group stubsEmil Velikov4-30/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12gallium/x11: remove empty GLX_SGIX_swap_group stubsEmil Velikov2-15/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12x11: remove empty GLX_SGIX_swap_group stubsEmil Velikov3-34/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12glx: remove empty GLX_SGIX_swap_barrier stubsEmil Velikov4-48/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12gallium/x11: remove empty GLX_SGIX_swap_barrier stubsEmil Velikov2-25/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12x11: remove empty GLX_SGIX_swap_barrier stubsEmil Velikov3-57/+0
The extension was never implemented. Quick search suggests: - no actual users (on my Arch setup) - the Nvidia driver does not implement the extension Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-12configure: remove unused AM_CONDITIONALEmil Velikov1-1/+0
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-12radv: Increase the number of dynamic uniform buffers.Bas Nieuwenhuizen2-3/+5
The vulkan API is not ideal as it does not allow us have a shared limit. Feral needs 15+6 for one of their games, and I'm not a fan of overcommitting the limits, so increase the number of dynamic uniform buffers to 16. CC: <mesa-stable@lists.freedesktop.org> CC: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2018-03-12u_vbuf/translate: pass max_index into the set_buffer.Dave Airlie1-1/+1
This fixes a memory trashing crash (not the test) seen with dEQP-GLES3.stress.draw.unaligned_data.random.203 on virgl. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-03-12r600: implement callstack workaround for evergreen.Dave Airlie1-8/+31
This is ported from the sb backend, there are some issues with evergreen stacks on the boundary between entries and ALU_PUSH_BEFORE instructions. Whenever we are going to use a push before, we check the stack usage and if we have to use the workaround, then we switch to a separate push. I noticed this problem dealing with some of the soft fp64 shaders, in nosb mode, they are quite stack happy. This fixes all the glitches and inconsistencies I've seen with them Reviewed-by: Roland Scheidegger <sroland@vmware.com> Tested-by: Elie Tournier <elie.tournier@collabora.com> Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-03-11gallium/util: add helper util_wait_for_idleMarek Olšák2-0/+15
This is an old patch that I had.
2018-03-10u_blit: (trivial) u_blit.h needs to include p_defines.hRoland Scheidegger1-0/+1
(For the pipe_tex_filter enum) Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-03-10travis: bump libxcb version to 1.13Christian Gmeiner1-2/+2
Fixes following dependency problem: Native dependency xcb-dri3 found: NO found '1.11' but need: '>= 1.13' Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Fixes: c80c08e22603 ("vulkan/wsi/x11: Add support for DRI3 v1.2")
2018-03-10mesa: Make gl_vertex_array contain pointers to first order VAO members.Mathias Fröhlich27-437/+480
Instead of keeping a copy of the vertex array content in struct gl_vertex_array only keep pointers to the first order information originaly in the VAO. For that represent the current values by struct gl_array_attributes and struct gl_vertex_buffer_binding. v2: Change comments. Remove gl... prefix from variables except in the i965 directory where it was like that before. Reindent because of that. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2018-03-10draw: fix alpha value for very short aa linesRoland Scheidegger2-2/+24
The logic would not work correctly for line lengths smaller than 1.0, even a degenerated line with length 0 would still produce a fragment with anyhwere between alpha 0.0 and 0.5. Reviewed-by: Brian Paul <brianp@vmware.com>
2018-03-09intel/vulkan: Hard code CS scratch_ids_per_subslice for CherryviewJordan Justen1-17/+28
Ken suggested that we might be underallocating scratch space on HD 400. Allocating scratch space as though there was actually 8 EUs seems to help with a GPU hang seen on synmark CSDof. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-03-09i965: Hard code CS scratch_ids_per_subslice for CherryviewJordan Justen1-17/+27
Ken suggested that we might be underallocating scratch space on HD 400. Allocating scratch space as though there was actually 8 EUs seems to help with a GPU hang seen on synmark CSDof. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104636 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105290 Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Eero Tamminen <eero.t.tamminen@intel.com>
2018-03-09st/dri: fix OpenGL-OpenCL interop for GL_TEXTURE_BUFFERMarek Olšák1-24/+34
Tested by our OpenCL team. Fixes: 9c499e6759b26c5e "st/mesa: don't invoke st_finalize_texture & st_convert_sampler for TBOs" Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-03-09radeonsi: add a workaround for GFX9 hang with init_config alignmentMarek Olšák1-1/+2
Fixes: 75c5d25f0f34cd702 "radeonsi: align command buffer starting address to fix some Raven hangs" Cc: 17.3 18.0 <mesa-stable@lists.freedesktop.org>
2018-03-09ac/gpu_info: print ib_start_alignment, add assertionMarek Olšák1-0/+2
2018-03-09meson: Use system_has_kms_drm in default driver selectionGreg V1-3/+5
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-09broadcom/vc4: Add an accelerated path to turn raster R8/RG88 into tiled.Eric Anholt3-0/+211
Drawing a 1080p YV12 video stream generated by MMAL goes from 10.5 FPS to 36.