summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* meson: Move xvmc test tools from unit tests to installed tools.Eric Anholt2018-07-133-19/+15
| | | | | | | | | These are not unit tests, as they rely on the host's XVMC and some user configuration. Switch them over to being general installed tools, to fix unit testing. Fixes: 22a817af8a89 ("meson: build gallium xvmc state tracker") Reviewed-by: Dylan Baker <[email protected]>
* r600: Add spill output to group only if register or target index changesGert Wollny2018-07-131-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current spill code checks in each instruction of an instruction group whether spilling is needed and if so, it adds spilling for each component as a seperate instruction and it allocates a new temporary for each component and since it takes the write mask from the TGSI representation, all components might be written each time and as a result already written components might be overwritten with garbage like: ... y: MOV R9.y, [0x42140000 37].x t: MOV R8.x, [0x42040000 33].y ... MEM_SCRATCH WRITE_IND_ACK 0 R9.xy__, @R4.x ES:3 MEM_SCRATCH WRITE_IND_ACK 0 R8.xy__, @R4.x ES:3 ... To resolve this isse accumulate spills to the same memory location so that only one memory write instruction is emitted for an instruction group that writes up to all four components. This fixes updated piglits (see https://patchwork.freedesktop.org/series/46064/): spec/glsl-1.30/execution fs-large-local-array-vec2.shader_test fs-large-local-array-vec3.shader_test fs-large-local-array-vec4.shader_test v2: fix some typos and add comment about piglits (Roland Scheidegger) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> (v1)
* i965/miptree: Allocate MS texture BOs as BUSYNanley Chery2018-07-131-2/+2
| | | | | | These buffer objects are never accessed with the CPU. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Inline make_separate_stencilNanley Chery2018-07-131-23/+6
| | | | | | | | | | Note that the separate stencil miptree now has the same alloc_flag as the depth component. Only stencil renderbuffers (as opposed to textures) have BO_ALLOC_BUSY. v2: Add note about BO_ALLOC_BUSY in message (Topi). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Init r8stencil_needs_update to falseNanley Chery2018-07-131-3/+4
| | | | | | | | | | | | | | | The current behavior masked two bugs where the flag was not set to true after modifying the stencil texture. One case was a regression introduced with commit bdbb527a65fc729e7a9319ae67de60d03d06c3fd and another was a bug in the depthstencil mapping code. These have since been fixed. To prevent such bugs from being masked in the future, initialize r8stencil_needs_update to false. v2: Keep the delayed allocation. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Refactor miptree_createNanley Chery2018-07-131-36/+12
| | | | | | | | Enable a future patch to create the r8stencil_mt in this function. v2: Explicitly set etc_format to MESA_FORMAT_NONE (Topi). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Add and use mt_surf_usageNanley Chery2018-07-131-13/+25
| | | | | | v2: Make mt_fmt const (Topi). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Share alloc_flags in miptree_createNanley Chery2018-07-131-7/+4
| | | | | | | | | Note that this maintains BO_ALLOC_BUSY for depth renderbuffers, but not depth textures. v2: Add note about BO_ALLOC_BUSY in message (Topi). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Share the miptree format in miptree_createNanley Chery2018-07-131-15/+15
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Share tiling_flags in miptree_createNanley Chery2018-07-131-8/+7
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Delete MIPTREE_CREATE_LINEARNanley Chery2018-07-132-13/+3
| | | | | | | | | This enum constant was introduced to enable blit maps with intel_miptree_create da2880bea05bfc87109477ab026a7f5401fc8f0c. Now that such maps use the more direct make_surface function which allows you to specify the tiling directly, the constant is no longer being used. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Use make_surface in map_blitNanley Chery2018-07-131-6/+6
| | | | | | | Do this so that we don't have to special case linearly-tiled depth buffers in miptree_create. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/draw: Fix adding the stencil bo to the depth cacheNanley Chery2018-07-131-1/+1
| | | | | | | | | Fix the case where stencil writes are enabled on a depth stencil texture. Found by inspection. v2: Fix message to allow for depth stencil writes (Topi). Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/draw: Set the r8stencil flag after drawingNanley Chery2018-07-131-1/+11
| | | | | | | | | | | | | | Fixes the regresion introduced with commit bdbb527a65fc729e7a9319ae67de60d03d06c3fd "i965: Use ISL for emitting depth/stencil/hiz state on gen6+" Found by inspection. Prevents regressing the piglit test, fbo-depth-array stencil-draw, later on in this series. Cc: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Set the r8stencil flag in map_depthstencilNanley Chery2018-07-131-1/+3
| | | | | | | | | | | Found by initializing the r8stencil_needs_update to false in make_separate_stencil_surface. Prevents regressing the piglit test arb_stencil_texturing-draw, later on in the series. Cc: Jordan Justen <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Set the r8stencil flag in miptree_finish_writeNanley Chery2018-07-134-17/+4
| | | | | | This seems to be the most appropriate place. Reviewed-by: Topi Pohjolainen <[email protected]>
* nir: cleanup oversized arrays in nir_swizzle callsKarol Herbst2018-07-138-34/+24
| | | | | | | | | | There are no fixed sized array arguments in C, those are simply pointers to unsized arrays and as the size is passed in anyway, just rely on that. where possible calls are replaced by nir_channel and nir_channels. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* i965/miptree: Use the correct BLT pitchNanley Chery2018-07-121-6/+6
| | | | | | | | | | Retile miptrees to a linear tiling less often. Retiling can cause issues with imported BOs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106738 Suggested-by: Chris Wilson <[email protected]> Cc: <[email protected]> Reviewed-by: Chris Wilson <[email protected]>
* i965/miptree: Drop an if case from retile_as_linearNanley Chery2018-07-121-4/+0
| | | | | | | | | | | Drop an if statement whose predicate never evaluates to true. row_pitch belongs to a surface with non-linear tiling. According to isl_calc_tiled_min_row_pitch, the pitch is a multiple of the tile width. By looking at isl_tiling_get_info, we see that non-linear tilings have widths greater than or equal to 128B. Cc: <[email protected]> Reviewed-by: Chris Wilson <[email protected]>
* i965: Make blt_pitch publicNanley Chery2018-07-122-10/+12
| | | | | | | We'd like to reuse this helper. Cc: <[email protected]> Reviewed-by: Chris Wilson <[email protected]>
* nir: delete not needed for reinserted nir_cf_listCaio Marcelo de Oliveira Filho2018-07-121-2/+0
| | | | | | | It wasn't causing problems since there's nothing to delete, but better be consistent with the rest of existing codebase. Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: remove struct kill_entry in constant propagationCaio Marcelo de Oliveira Filho2018-07-121-26/+7
| | | | | | | | | | The only value in kill_entry is the writemask, which can be stored in the data pointer of the hash table entry. Suggested by Eric Anholt. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* glsl: slim the kill_entry struct used in const propagationCaio Marcelo de Oliveira Filho2018-07-121-8/+5
| | | | | | | | | | | | | | | | | Since 4654439fdd7 "glsl: Use hash tables for opt_constant_propagation() kill sets." uses a hash_table for storing kill_entries, so the structs can be simplified. Remove the exec_node from kill_entry since it is not used in an exec_list anymore. Remove the 'var' from kill_entry since it is now redundant with the key of the hash table. Suggested by Eric Anholt. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* i965: fix typo (wrong gen number) in commentCaio Marcelo de Oliveira Filho2018-07-121-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* util/set: helper to remove entry by keyCaio Marcelo de Oliveira Filho2018-07-123-0/+39
| | | | | | v2: Add unit test. (Eric Anholt) Reviewed-by: Eric Anholt <[email protected]>
* util/set: add a clone functionCaio Marcelo de Oliveira Filho2018-07-123-0/+58
| | | | | | v2: Add unit test. (Eric Anholt) Reviewed-by: Eric Anholt <[email protected]>
* util/set: add a basic unit testCaio Marcelo de Oliveira Filho2018-07-126-1/+131
| | | | Reviewed-by: Eric Anholt <[email protected]>
* radeonsi: add support for Vega20Marek Olšák2018-07-1212-3/+26
| | | | Reviewed-by: Alex Deucher <[email protected]>
* u_blitter: Add an option to draw the triangles using an index buffer.Eric Anholt2018-07-123-2/+17
| | | | | | | | | | | | | | | For V3D, the HW will interpolate slightly differently along the shared edge of the trifan. The conformance tests manage to catch this in the nearest_consistency_* group. To get interpolation to match, we need the last vertex of the triangle to be shared. I first tried implementing draw_rectangle to do triangles instead, but that was quite a bit (147 lines) of code duplication from u_blitter, and this seems much simpler and less likely to break as u_blitter changes. Fixes dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_* on V3D. Reviewed-by: Marek Olšák <[email protected]>
* u_draw: Add some indices to the util_draw_elements() helpers.Eric Anholt2018-07-121-1/+8
| | | | | | | | | | | | These helpers have been unused, and were definitely not useful since 330d0607ed60 ("gallium: remove pipe_index_buffer and set_index_buffer") made it so that they never had an index buffer passed in. For an upcoming u_blitter change to use these helpers, I have just 6 bytes of index data, so pass it as user data until a more interesting caller comes along. Reviewed-by: Marek Olšák <[email protected]>
* vc4: Don't automatically reallocate a PERSISTENT-mapped buffer.Eric Anholt2018-07-121-1/+1
| | | | | | | I had mistakenly used the COHERENT flag, which can only be set when PERSISTENT is mapped, but isn't always. Fixes: a2014c2eb9e0 ("vc4: Simplify the DISCARD_RANGE handling")
* v3d: Don't automatically reallocate a PERSISTENT-mapped buffer.Eric Anholt2018-07-121-1/+1
| | | | | | | I had mistakenly used the COHERENT flag, which can only be set when PERSISTENT is mapped, but isn't always. Fixes piglit bufferstorage-persistent read
* v3d: Fix stride of 1D_ARRAY mappings.Eric Anholt2018-07-121-1/+1
| | | | | | All of our other texture arrays will be tiled, but 1D is an array of raster mappings and we had the wrong value plugged in here. Fixes piglit getteximage-targets 1D_ARRAY
* v3d: Fix MRT blending with independent blending disabled.Eric Anholt2018-07-122-6/+14
| | | | | | | | We were only emitting the RT blend state for RT 0 and only enabling it for RT 0, when the gallium API for !independent_blend is for rt0's state to apply to all of them. Fixes piglit fbo-drawbuffers-blend-add.
* gallium/u_transfer_helper: Initialize the stride of MSAA maps.Eric Anholt2018-07-121-0/+1
| | | | | | | | | | | We just never set the value that was returned for MSAA mappings (directly reading back an MSAA framebuffer). Since we're handing back ss_map, it should be ss_map's stride from our nested transfer. Fixes piglit /home/anholt/src/piglit/bin/fbo-depthstencil -samples=4 cases. Reviewed-by: Rob Clark <[email protected]>
* gallium/u_transfer_helper: Fix MSAA mappings with nonzero x/y.Eric Anholt2018-07-121-1/+5
| | | | | | | | | | | | We created a temporary with box->{width,height} and then tried to map width,height from a nonzero offset when we meant to just map the whole temporary. Fixes segfaults in V3D in dEQP-GLES3.functional.prerequisite.read_pixels with --deqp-egl-config-name=rgba8888d24s8ms4 and also piglit's read-front clear-front-first -samples=4 Reviewed-by: Rob Clark <[email protected]>
* util/rb_tree: Fix a compiler warningJason Ekstrand2018-07-121-1/+1
| | | | | | | Gcc 8 warns "cast to pointer from integer of different size" in 32-bit builds. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* i965/fs: unspills shoudn't use grf127 as dest since Gen8+Jose Maria Casanova Crespo2018-07-122-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At 232ed8980217dd65ab0925df28156f565b94b2e5 "i965/fs: Register allocator shoudn't use grf127 for sends dest" we didn't take into account the case of SEND instructions that are not send_from_grf. But since Gen7+ although the backend still uses MRFs internally for sends they are finally assigned to a GRFs. In the case of unspills the backend assigns directly as source its destination because it is suppose to be available. So we always have a source-destination overlap. If the reg_allocator assigns registers that include the grf127 we fail the validation rule that affects Gen8+ "r127 must not be used for return address when there is a src and dest overlap in send instruction." So this patch activates the grf127_send_hack_node for Gen8+ and if we have any register spilled we add interferences to the destination of the unspill operations. We also need to avoid that opt_bank_conflicts() optimization, that runs after the register allocation, doesn't move things around, causing the grf127 to be used in the condition we were avoiding. Fixes piglit test tests/spec/arb_compute_shader/linker/bug-93840.shader_test and some shader-db crashed because of the grf127 validation rule.. v2: make sure that opt_bank_conflicts() optimization doesn't change the use of grf127. (Caio) Found by Caio Marcelo de Oliveira Filho Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107193 Fixes: 232ed89802 "i965/fs: Register allocator shoudn't use grf127 for sends dest" Cc: 18.1 <[email protected]> Cc: Caio Marcelo de Oliveira Filho <[email protected]> Cc: Jason Ekstrand <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* gallium: Check pipe_screen::resource_changed before dereferencing itMichel Dänzer2018-07-124-4/+8
| | | | | | | | | | It's optional, only implemented by the etnaviv driver so far. Fixes: 501d0edeca32 "st/mesa: call resource_changed when binding a EGLImage to a texture" Fixes: a37cf630b4d1 "gallium: add pipe_screen::resource_changed callback wrappers" Reviewed-by: Lucas Stach <[email protected]>
* docs/features: Add the missing KHR extensionsJason Ekstrand2018-07-121-0/+5
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* docs/features: Move the Vulkan 1.1 extensions to the 1.1 sectionJason Ekstrand2018-07-121-14/+25
| | | | | | | While we're at it, add some extensions we missed along the way like the VK_KHR_maintenanceN extensions. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* docs/features: Mark some Vulkan extensions as doneJason Ekstrand2018-07-121-9/+9
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir/spirv: handle OpConstantComposites with OpUndef membersKarol Herbst2018-07-121-2/+13
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir/spirv: implement BuiltInGlobalSizeKarol Herbst2018-07-124-0/+13
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir: move lowering of SYSTEM_VALUE_LOCAL_GROUP_SIZE into a functionKarol Herbst2018-07-121-16/+14
| | | | | | | | we already have this code duplicated and we will need it for the global group size as well Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* compiler: add missing entries to gl_system_value_nameKarol Herbst2018-07-121-1/+4
| | | | | | | | | also reorder to match the gl_system_value enum. It is weird that the STATIC_ASSERT doesn't trigger though. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir/spirv: print extension name in fail msgRob Clark2018-07-121-4/+5
| | | | | | Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* nir/spirv: Use imov where we might have 8 bit typesRob Clark2018-07-121-2/+2
| | | | | | | | Otherwise nir_validate may complain about 8 bit floats, which do not exist. Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* radv: simplify the logic in radv_set_descriptor_set()Samuel Pitoiset2018-07-121-4/+2
| | | | | | | | | Now that 'set' can't be NULL because the meta operations no longer bind a NULL descriptor, the logic can be simplified a little bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove one useless check in radv_bind_descriptor_set()Samuel Pitoiset2018-07-121-2/+1
| | | | | | | 'set' shouldn't be NULL. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>