summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/radeonsi: enable disk cache for nirTimothy Arceri2018-02-102-8/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st: add nir shader disk cache supportTimothy Arceri2018-02-104-44/+135
| | | | | | v2: include compute shader support Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: move nir detection earlierTimothy Arceri2018-02-101-8/+7
| | | | | | | | | | | We move the nir check before the shader cache call so that we can call a nir based caching function in a following patch. Also with this change we simply check if vertex shaders support NIR rather than looping over the stages as mixing of shader types is not supported anyway. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: stop returning PIPE_SHADER_IR_NATIVE for PIPE_SHADER_CAP_PREFERRED_IRTimothy Arceri2018-02-101-3/+0
| | | | | | | | | Clover now checks PIPE_SHADER_CAP_SUPPORTED_IRS for native support instead. This change indirectly enables NIR support for compute shaders on radeonsi. Reviewed-by: Marek Olšák <[email protected]>
* r600: always return PIPE_SHADER_IR_TGSI for PIPE_SHADER_CAP_PREFERRED_IRTimothy Arceri2018-02-101-5/+1
| | | | | | | We now use PIPE_SHADER_CAP_SUPPORTED_IRS to check for native support in clover. Reviewed-by: Marek Olšák <[email protected]>
* clover: use PIPE_SHADER_CAP_SUPPORTED_IRS to discover IRTimothy Arceri2018-02-101-2/+9
| | | | | | | PIPE_SHADER_CAP_PREFERRED_IR was conflicting with PIPE_SHADER_IR_NIR for compute shaders, so we let clover pick the one it wants to use. Reviewed-by: Marek Olšák <[email protected]>
* r600: add PIPE_SHADER_IR_NATIVE to supported shaders for csTimothy Arceri2018-02-101-3/+7
| | | | | Acked-by: Pierre Moreau <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/nir: add depth layout to scan passTimothy Arceri2018-02-101-0/+19
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi/nir: add FRAG_RESULT_COLOR to scan passTimothy Arceri2018-02-101-0/+6
| | | | | | Fixes a number of draw buffers piglit tests. Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: convert nir_op_f2f32 src to a floatTimothy Arceri2018-02-101-0/+1
| | | | | | | | | | | | | | | | Fixes the following piglit test: ./bin/arb_vertex_attrib_64bit-check-explicit-location -auto -fbo Where we would end up with the nir such as: vec1 64 ssa_11 = pack_64_2x32_split ssa_9, ssa_10 vec1 32 ssa_12 = f2f32 ssa_2 And our pack_64_2x32_split nir to llvm code always produces a 64bit integer as output. Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: fix some 64bit unpack assertsTimothy Arceri2018-02-101-2/+2
| | | | | | Previously the asserts did not take swizzles into account. Reviewed-by: Samuel Pitoiset <[email protected]>
* Revert "i965: prevent potentially null pointer access"Mark Janes2018-02-091-1/+1
| | | | | | | This reverts commit 712332ed54f14b5ee34c2990e351ca48992488b2, which caused over 90k failures in Mesa i965 CI. Reviewed-by: Dylan Baker <[email protected]>
* egl/gbm: Ensure EGLConfigs match GBM surface formatDaniel Stone2018-02-091-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | When we create an EGL window surface on a GBM surface, ensure that the EGLConfig is compatible with the GBM format, notwithstanding XRGB/ARGB interchange. For example, rendering with an XRGB8888 EGLConfig on to an ARGB8888 gbm_surface (and vice-versa) are acceptable, but rendering with an XRGB2101010 EGLConfig on to an XRGB8888 gbm_surface will now be rejected. This was previously allowed through; when 10bpc formats were enabled, clients which picked a completely random EGL config and hoped/assumed they were XRGB8888 would break. If you have bisected a failure to start a GBM/KMS client to this commit, please look at its EGLConfig selection (e.g. through eglChooseConfigs), and add an EGL_NATIVE_VISUAL_ID == gbm_surface format match to the attribs for config selection. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/gbm: Remove duplicate format tableDaniel Stone2018-02-091-18/+17
| | | | | | | | | | | | | | Now that we have mask/channel information in gbm_dri's format conversion table, we can remove the copy in EGL. As this table contains more formats (notably including R8 and RG8, which can be used for BO but not surface allocation), we now compare the masks of all channels when trying to find a suitable config. Without doing this, an XRGB8888 EGLConfig would match on an R8 format. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* gbm/dri: Expose visuals table through gbm_dri_deviceDaniel Stone2018-02-092-11/+19
| | | | | | Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* gbm/dri: Add RGBA masks to GBM format tableDaniel Stone2018-02-091-9/+37
| | | | | | | | | Eventually, we can replace the visuals list inside GBM EGL driver with this one. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use an array for modifiersDaniel Stone2018-02-092-72/+20
| | | | | | | | | | | Each Wayland EGLDisplay currently contains a struct with one vector of modifiers per format, hardcoded in the header. To allow easier support for more formats, turn this into an array of u_vectors which is opaque outside of platform_wayland.c. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Remove has_format enumDaniel Stone2018-02-091-19/+14
| | | | | | | | | Instead of the has_format enum, use an index into the visual array. This makes adding new formats less typing. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Add bpp to visual mapDaniel Stone2018-02-091-24/+12
| | | | | | | | | | Both the DRI2 GetBuffersWithFormat interface, and SHM buffer allocation, had their own format -> bpp lookup tables. Replace these with a lookup into the visual map. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for DRIImage<->FourCC mapDaniel Stone2018-02-091-14/+11
| | | | | | | | | When trying to translate between DRIImage format enums and FourCC codes, use our visual map rather than an open-coded subset. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for format advertisementDaniel Stone2018-02-091-39/+36
| | | | | | Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for buffer_from_imageDaniel Stone2018-02-091-21/+19
| | | | | | | | | | When creating a wl_buffer on an upstream Wayland display from an existing EGLImage, use the dri2_wl_visual map rather than another hardcoded list of formats. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for config->format lookupDaniel Stone2018-02-091-25/+36
| | | | | | | | | Having hoisted the format -> config map into common code, we now use it for config -> format lookups. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Add format enums to visual mapDaniel Stone2018-02-091-0/+13
| | | | | | | | | | | | | | Extend the visual map from only containing names and bitmasks, to also carrying the three format enums we need. These are the DRIImage format tokens for internal allocation, FourCC codes for wl_drm and dmabuf protocol, and wl_shm codes for swrast drivers. We will later use these formats to eliminate a bunch of open-coded conversions. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use proper enum type in visual definitionDaniel Stone2018-02-091-1/+1
| | | | | | | | No semantic change. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Widen channel masks to bppDaniel Stone2018-02-091-5/+20
| | | | | | | | | | | Widen the channel masks given in the visual table to the full width of the pixel format, i.e. as many leading zeros as required. No functional change. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Hoist format <-> EGLConfig definition upDaniel Stone2018-02-091-16/+17
| | | | | | | | | Pull the mapping between Wayland formats and EGLConfigs up to the top level, so we can reuse it elsewhere. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Fix ARGB/XRGB transposition in config mapDaniel Stone2018-02-091-2/+2
| | | | | | | | | | | | When 0b2b7191214eb moved from an if tree to a struct to map between wl_drm formats and EGLConfigs, it transposed the mapping between XRGB and ARGB. Luckily, everyone exposes both formats, so this is harmless. Signed-off-by: Daniel Stone <[email protected]> Fixes: 0b2b7191214eb ("egl/wayland: introduce dri2_wl_add_configs_for_visuals() helper") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* st/mesa: generate blend state according to the number of enabled color buffersMarek Olšák2018-02-094-9/+16
| | | | | | | | | | Non-MRT cases always translate blend state for 1 color buffer only. MRT cases only check and translate blend state for enabled color buffers. This also avoids an assertion failure in translate_blend for: dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_advanced_blend_eq_buffer_blend_eq Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't translate blend state when color writes are disabledMarek Olšák2018-02-091-4/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't translate blend state when it's disabled for a colorbufferMarek Olšák2018-02-091-3/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: prevent potentially null pointer accessLionel Landwerlin2018-02-091-1/+1
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> CID: 1418110
* st/va: Make the vendor string more descriptiveMark Thompson2018-02-092-1/+6
| | | | | | | Include the Mesa version and detail about the platform. Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: Enable vaExportSurfaceHandle()Mark Thompson2018-02-092-2/+8
| | | | | | | It is present from libva 2.1 (VAAPI 1.1.0 or higher). Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* disk cache: move path creation back to constructorTapani Pälli2018-02-091-86/+76
| | | | | | | | | | | This patch moves disk cache path and index creation back to the constructor which matches previous behavior. We still allow create to succeed without path so that cache can be used with callback functionality. Fixes: c95d3ed091 "disk cache: create cache even if path creation fails" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* ac/nir: compute correct number of user SGPRs on GFX9Samuel Pitoiset2018-02-091-10/+29
| | | | | | | For merged shaders. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: Initialize tex_target in compile_tgsi_instructionMichel Dänzer2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize to TGSI_TEXTURE_BUFFER (== 0), same as was done before the variable type was changed to enum tgsi_texture_type. Fixes a bunch of piglit failures with radeonsi, e.g.: gles-3.0-transform-feedback-uniform-buffer-object: ../../../../src/gallium/auxiliary/tgsi/tgsi_util.c:502: tgsi_util_get_texture_coord_dim: Assertion `!"unknown texture target"' failed. Corresponding compiler warning: CXX state_tracker/st_glsl_to_tgsi.lo ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp: In function ‘pipe_error st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, const gl_program*, GLuint, const ubyte*, const ubyte*, const ubyte*, const ubyte*, const ubyte*, GLuint, const ubyte*, const ubyte*, const ubyte*)’: ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5992:23: warning: ‘tex_target’ may be used uninitialized in this function [-Wmaybe-uninitialized] ureg_memory_insn(ureg, inst->op, dst, num_dst, src, num_src, ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inst->buffer_access, ~~~~~~~~~~~~~~~~~~~~ tex_target, inst->image_format); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5866:27: note: ‘tex_target’ was declared here enum tgsi_texture_type tex_target; ^~~~~~~~~~ Fixes: 9f9ce1625fb3 ("st/mesa: use TGSI enum types in st_glsl_to_tgsi.cpp") Reviewed-by: Marek Olšák <[email protected]>
* glsl/linker: remove ubo explicit binding handlingAlejandro Piñeiro2018-02-091-56/+2
| | | | | | | | | | | | This is already handled at link_uniform_blocks, specifically at process_block_array_leaf. Additionally, this code was not handling correctly arrays of arrays. When creating the name of the block to set the binding, it only took into account the first level, so any attempt to set a explicit binding on a array of array ubo would trigger an assertion. Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Only update enabled VAO gl_vertex_array entries.Mathias Fröhlich2018-02-092-15/+22
| | | | | | | | | | | | Instead of updating all modified gl_vertex_array_object::_VertexArray entries just update those that are modified and enabled. Also release buffer object from the _VertexArray that belong to disabled attributes. v2: Also set Ptr and Size to zero. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Mute arrays for several meta like callbacks.Mathias Fröhlich2018-02-095-5/+18
| | | | | | | | | | | | | Set the _DrawArray pointer to NULL when calling into the Drivers Bitmap/CopyPixels/DrawAtlasBitmaps/DrawPixels/DrawTex hooks. This fixes an assert that gets uncovered when the following patch gets applied. v2: Mute from within the state tracker instead of generic mesa. v3: Avoid evaluating _DrawArrays from within st_validate_state. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Fix VAO buffer object tracking.Mathias Fröhlich2018-02-091-0/+2
| | | | | | | | When changing the attribute binding in the VAO we also need to account for getting rid of non vbo bits from VertexAttribBufferMask. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeonsi/nir: gather some missing fs infoTimothy Arceri2018-02-091-0/+5
| | | | | | Fixes some early-z arb_shader_image_load_store piglit tests. Reviewed-by: Marek Olšák <[email protected]>
* ac: pass struct ac_llvm_context to emit_membar()Timothy Arceri2018-02-091-3/+3
| | | | | | | | Fixes segfault in piglit test: ./bin/arb_shader_image_load_store-shader-mem-barrier --quick -auto -fbo Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: copy the NIR enablement debug bit to the shader cache flagsMarek Olšák2018-02-091-1/+2
| | | | | | | When NIR is enabled, TGSI must not be used. When NIR is disabled, TGSI Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* intel/blorp: Use isl_aux_op instead of blorp_hiz_opJason Ekstrand2018-02-0810-71/+44
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* intel/blorp: Use isl_aux_op instead of blorp_fast_clear_opJason Ekstrand2018-02-088-55/+36
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv: Allow fast-clearing the first slice of a multi-slice imageJason Ekstrand2018-02-082-12/+23
| | | | | | | | Now that we're tracking aux properly per-slice, we can enable this for applications which actually care. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Rework aux trackingJason Ekstrand2018-02-084-171/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit completely reworks aux tracking. This includes a number of somewhat distinct changes: 1) Since we are no longer fast-clearing multiple slices, we only need to track one fast clear color and one fast clear type. 2) We store two bits for fast clear instead of one to let us distinguish between zero and non-zero fast clear colors. This is needed so that we can do full resolves when transitioning to PRESENT_SRC_KHR with gen9 CCS images where we allow zero clear values in all sorts of places we wouldn't normally. 3) We now track compression state as a boolean separate from fast clear type and this is tracked on a per-slice granularity. The previous scheme had some issues when it came to individual slices of a multi-LOD images. In particular, we only tracked "needs resolve" per-LOD but you could do a vkCmdPipelineBarrier that would only resolve a portion of the image and would set "needs resolve" to false anyway. Also, any transition from an undefined layout would reset the clear color for the entire LOD regardless of whether or not there was some clear color on some other slice. As far as full/partial resolves go, he assumptions of the previous scheme held because the one case where we do need a full resolve when CCS_E is enabled is for window-system images. Since we only ever allowed X-tiled window-system images, CCS was entirely disabled on gen9+ and we never got CCS_E. With the advent of Y-tiled window-system buffers, we now need to properly support doing a full resolve of images marked CCS_E. v2 (Jason Ekstrand): - Fix an bug in the compressed flag offset calculation - Treat 3D images as multi-slice for the purposes of resolve tracking v3 (Jason Ekstrand): - Set the compressed flag whenever we fast-clear - Simplify the resolve predicate computation logic Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Move the mi_alu helper higher upJason Ekstrand2018-02-081-17/+19
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/image: Simplify some verbose commenntsJason Ekstrand2018-02-081-10/+3
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>