summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* radv/meta: do not restore a NULL descriptorSamuel Pitoiset2018-07-121-4/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unnecessary verification code around ring_offsets_idxSamuel Pitoiset2018-07-122-18/+0
| | | | | | | I don't want to waste CPU cycles for nothing. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: get rid of buffer object prioritiesSamuel Pitoiset2018-07-127-85/+52
| | | | | | | | | We mostly use the same priority for all buffer objects, so I don't think that matter much. This should reduce CPU overhead a little bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* st/mesa: call resource_changed when binding a EGLImage to a textureLucas Stach2018-07-121-0/+1
| | | | | | | | | | When a EGLImage is newly bound to a texture, we need to make sure the driver is informed that the resource might have changed. Fixes stale texture content on Etnaviv when binding an existing EGLImage to an existing texture object. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: emit a dummy ZPASS_DONE to prevent GPU hangs on GFX9Samuel Pitoiset2018-07-125-14/+47
| | | | | | | | | | A ZPASS_DONE or PIXEL_STAT_DUMP_EVENT (of the DB occlusion counters) must immediately precede every timestamp event to prevent a GPU hang on GFX9. Cc: 18.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add support for VK_KHR_create_renderpass2Samuel Pitoiset2018-07-123-0/+194
| | | | | | | | VkCreateRenderPass2KHR() is quite similar to VkCreateRenderPass() but refactoring the code is a bit painful. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: introduce radv_subpass_attachment data structureSamuel Pitoiset2018-07-127-31/+44
| | | | | | | Needed for VK_KHR_create_renderpass2. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* st/mesa: Only enable depth writes if the function isn't EQUAL.Kenneth Graunke2018-07-111-1/+2
| | | | | | | | | | If the depth function is EQUAL, then we'll only write the depth value when it already matches what's in the buffer, which is pointless. Skipping these writes can save bandwidth. The state tracker can easily take care of this, so all drivers benefit. Reviewed-by: Marek Olšák <[email protected]>
* anv/android: Fix type error in call to vk_errorf()Chad Versace2018-07-111-1/+1
| | | | | | | | | | In a single call to vk_errorf() in the Android code, the arguments were swapped. The bug has existed since day one. Chrome OS used to forgive the warning, but it is now a compilation error. CC: <[email protected]> Fixes: 053d4c32 "anv: Implement VK_ANDROID_native_buffer (v9)" Reviewed-by: Tapani Pälli <[email protected]>
* anv/android: Fix Autotools build for VK_ANDROID_native_bufferChad Versace2018-07-111-1/+4
| | | | | | | | | | | | Changes to vk.xml and anv_entrypoints_gen.py broke the Autotools build on Android. The changes undef'd the VK_ANDROID_native_buffer entrypoints in anv_entrypoints.h. Fix it with CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR. CC: <[email protected]> See-Also: 63525ba7 "android: enable VK_ANDROID_native_buffer" Reviewed-by: Tapani Pälli <[email protected]>
* radv: make sure to wait for CP DMA when neededSamuel Pitoiset2018-07-113-4/+52
| | | | | | | | | This might fix some synchronization issues. I don't know if that will affect performance but it's required for correctness. CC: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* intel/tools/dump_gpu: Add option to print ppgtt mappings.Rafael Antognolli2018-07-102-1/+30
| | | | | | | | Using -vv will increase the verbosity, by printing the ppgtt mappings as they get written into the aub file. Cc: Lionel Landwerlin <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* spirv: Fix InterpolateAt* instructions for vecs with dynamic indexNeil Roberts2018-07-101-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the glsl is something like this: in vec4 some_input; interpolateAtCentroid(some_input[idx]) then it now gets generated as if it were: interpolateAtCentroid(some_input)[idx] This is necessary because the index will get generated as a series of nir_bcsel instructions so it would no longer be an input variable. It is similar to what is done for GLSL in ca63a5ed3e9efb2bd645b42. Although I can’t find anything explicit in the Vulkan specs to say this should be allowed, the SPIR-V spec just says “the operand interpolant must be a pointer to the Input Storage Class”, which I guess doesn’t rule out any type of pointer to an input. This was found using the spec/glsl-4.40/execution/fs-interpolateAt* Piglit tests with the ARB_gl_spirv branch. Signed-off-by: Neil Roberts <[email protected]> Signed-off-by: Alejandro Piñeiro <[email protected]> v2: update after nir_deref_instr land on master. Implemented by Alejandro Piñeiro. Special thanks to Jason Ekstrand for guidance at the new nir_deref_instr world. Reviewed-by: Jason Ekstrand <[email protected]>
* intel/ir: Uncomment definition of several unused hardware opcodes.Francisco Jerez2018-07-091-14/+14
| | | | | | | | | | There are a number of opcode_desc table entries for many of these unused opcodes. A symbolic opcode enum will be required in a future commit in order to keep them in the opcode description tables. The alternative would be to remove the unused opcodes from the opcode description tables. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/fs: Initialize mlen for gen7 varying pull constant load messages.Francisco Jerez2018-07-092-7/+5
| | | | | | | This makes the message length available at the IR level, which should save some guesswork in a future commit. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/eu: Assert that the instruction is send-like in brw_set_desc_ex().Francisco Jerez2018-07-091-2/+3
| | | | | | | Constructing a descriptor in-place as part of the immediate of an ALU instruction is no longer supported. Reviewed-by: Kenneth Graunke <[email protected]>
* intel/eu: Get rid of the return value of brw_send_indirect_message().Francisco Jerez2018-07-092-20/+5
| | | | | | | | | The return value is not used anymore. This allows simplifying the code slightly, and in addition it should frustrate anybody's attempts to continue using the obsolete piecemeal approach to construct a message descriptor in combination with brw_send_indirect_message(). Reviewed-by: Kenneth Graunke <[email protected]>