summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965/gen10: Ignore push constant packets during context restore.Rafael Antognolli2018-01-263-0/+54
| | | | | | | | | | | | | | | | | These packets were causing GPU hangs when the context was restored, possibly because they were pointing to BO's that were already unreferenced. So we tell the hardware to ignore such packets after the batch buffer ends, since we know those BO's are not around anymore. This change fixes GPU hangs on CNL. The (partial) solution to this problem so far was to entirely disable push constants on this platform. Signed-off-by: Rafael Antognolli <[email protected]> Cc: Kenneth Graunke <[email protected]> Cc: "18.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit ca19ee33d7d39cb89d948b1c983763065975ce5b)
* mesa: Fix function pointers initialization in status trackerEleni Maria Stea2018-01-261-2/+2
| | | | | | | | | | | We assigned the function that gets the device uuid to the GetDriverUuid function pointer and the function that gets the driver uuid to the GetDeviceUuid function pointer inside the state tracker. Exchanged the pointers. cc: [email protected] Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 8096b558a7d769b20b1545b83399d67b8a3df94a)
* ac/nir: set amdgpu.uniform and invariant.load for UBOsSamuel Pitoiset2018-01-261-1/+7
| | | | | | | | | | | UBOs are constants buffers. Cc: "18.0" <[email protected]> Fixes: 41c36c45 ("amd/common: use ac_build_buffer_load() for emitting UBO loads") Signed-off-by: Samuel Pitoiset <[email protected]> Tested-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> (cherry picked from commit 49b0a140a731069e0e4959c65bfd1b597a4fb141)
* anv/pipeline: Don't look at blend state unless we have an attachmentJason Ekstrand2018-01-261-3/+3
| | | | | | | | | | | | | Without this, we may end up dereferencing blend before we check for binding->index != UINT32_MAX. However, Vulkan allows the blend state to be NULL so long as you don't have any color attachments. This fixes a segfault when running The Talos Principal. Fixes: 12f4e00b69e724a23504b7bd3958fb75dc462950 Cc: [email protected] Reviewed-by: Alex Smith <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> (cherry picked from commit c8949e24984266cca3593291c30ea199baef5358)
* i965/fs: Reset the register file to VGRF in lower_integer_multiplicationJason Ekstrand2018-01-261-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 18fde36ced4279f2577097a1a7d31b55f2f5f141 changed the way temporary registers were allocated in lower_integer_multiplication so that we allocate regs_written(inst) space and keep the stride of the original destination register. This was to ensure that any MUL which originally followed the CHV/BXT integer multiply regioning restrictions would continue to follow those restrictions even after lowering. This works fine except that I forgot to reset the register file to VGRF so, even though they were assigned a number from alloc.allocate(), they had the wrong register file. This caused some GLES 3.0 CTS tests to start failing on Sandy Bridge due to attempted reads from the MRF: ES3-CTS.functional.shaders.precision.int.highp_mul_fragment.snbm64 ES3-CTS.functional.shaders.precision.int.mediump_mul_fragment.snbm64 ES3-CTS.functional.shaders.precision.int.lowp_mul_fragment.snbm64 ES3-CTS.functional.shaders.precision.uint.highp_mul_fragment.snbm64 ES3-CTS.functional.shaders.precision.uint.mediump_mul_fragment.snbm64 ES3-CTS.functional.shaders.precision.uint.lowp_mul_fragment.snbm64 This commit remedies this problem by, instead of copying inst->dst and overwriting nr, just make a new register and set the region to match inst->dst. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103626 Fixes: 18fde36ced4279f2577097a1a7d31b55f2f5f141 Cc: "17.3" <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit db682b8f0eafd3b9d58e736e9e2f520943a89942)
* swr/rast: support llvm 3.9 type declarationsGeorge Kyriazis2018-01-261-0/+14
| | | | | | | | | | | LLVM 3.9 was not taken into account in initial check-in. Fixes: 01ab218bbc ("swr/rast: Initial work for debugging support.") cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104749 Acked-by: Emil Velikov <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]> (cherry picked from commit 0e879aad2fd1dac102c13d680edf455aa068d5df)
* i965/draw: Set NEW_AUX_STATE when draw aux changesJason Ekstrand2018-01-261-1/+4
| | | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383 Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a Cc: [email protected] Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 20f70ae3858bc213e052a8434f0e637eb36203c4)
* i965: Replace draw_aux_buffer_disabled with draw_aux_usageJason Ekstrand2018-01-264-35/+27
| | | | | | | | | | | | Instead of keeping an array of booleans, we now hang onto an array of isl_aux_usage enums. This means that the thing we are passing from brw_draw.c to surface state setup is the thing that surface state setup actually needs instead of an input to compute what it needs. Cc: [email protected] Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit e52a9f18d69c94b7cb7f81361cdb9e2582c3d742)
* i965/surface_state: Drop brw_aux_surface_disabledJason Ekstrand2018-01-261-20/+0
| | | | | | | | | | | | | | The only purpose of this function is to disable aux on texture surfaces when the corresponding renderbuffer has aux disabled. However, the act of disabling aux on the renderbuffer will cause it to be resolved and intel_miptree_texture_aux_usage will already check the resolved status of a texture and return ISL_AUX_USAGE_NONE for it. Even if we used CCS for it, that wouldn't really be a problem because the CCS will be in the pass-through state and so it would effectively be ignored. Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 468ea3cc451f2c71e7d1be528090cb0334d500c2)
* i965/miptree: Add an aux_disabled parameter to render_aux_usageJason Ekstrand2018-01-265-8/+17
| | | | | | | | | | | | | | | | | | | | | Only one of the callers of intel_miptree_render_aux_usage actually took brw->draw_aux_buffer_disabled into account. This was causing us to ignore draw_aux_buffer_disabled for the intel_miptree_prepare_render. This isn't a problem because the draw_aux_buffer_disabled entry was set during texture preparation and we already did the resolve at that time. However, this also meant that the aux_usage we were passing to brw_cache_flush_for_render and brw_render_cache_add_bo was wrong so our automatic cache flushing around aux_usage changes wasn't happening. This was causing GPU hangs in Oxenfree. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104711 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104411 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104383 Fixes: ea0d2e98ecb369ab84e78c84709c0930ea8c293a Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit d38ec24f531fac0b53c406a09d17427309a3ffca)
* i965/miptree: Take an aux_usage in prepare/finish_renderJason Ekstrand2018-01-264-16/+8
| | | | | | | | | | | Both callers of intel_miptree_prepare/finish_render have to call intel_miptree_render_aux_usage anyway for other reasons. They may as well pass the result in instead of us calling it again. Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit dfe02179055b2504303e23988ab3d446b40de05a)
* radeonsi: don't ignore pitch for imported texturesMarek Olšák2018-01-261-2/+12
| | | | | | | Cc: 17.2 17.3 <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit 022c5b22fee5d92da67f48601ea80b1c810a829d)
* i965: Don't try to disable render aux buffers for computeTopi Pohjolainen2018-01-261-2/+4
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104546 Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]> (cherry picked from commit ec4bb693a0175744465f272a8bcea2db043ba1bc)
* anv/cmd_buffer: Move gen7 index buffer state to graphics stateJason Ekstrand2018-01-262-13/+13
| | | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 4064fe59e7144fa822568543cfcc043387645d4e)
* anv/cmd_buffer: Move num_workgroups to compute stateJason Ekstrand2018-01-262-9/+12
| | | | | | | | | While we're here, make it an anv_address. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 38ec78049f69821091a2d42b0f457a1b044d4273)
* anv/cmd_buffer: Move dynamic state to graphics stateJason Ekstrand2018-01-264-30/+33
| | | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 95ff2322948692f5f7b1d444aabe878fba53304c)
* anv/cmd_buffer: Use a temporary variable for dynamic stateJason Ekstrand2018-01-262-27/+24
| | | | | | | | | | We were already doing this for some packets to keep the lines shorter. We may as well just do it for all of them. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 24caee8975355a2b54b41c484ff3c897e1911760)
* anv/cmd_buffer: Move vb_dirty bits into anv_cmd_graphics_stateJason Ekstrand2018-01-264-7/+7
| | | | | | | | | Vertex buffers are entirely a graphics pipeline thing. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 8bd5ec5b862333c936426ff18d093d07dd006182)
* anv/cmd_buffer: Move dirty bits into anv_cmd_*_stateJason Ekstrand2018-01-267-60/+62
| | | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit e85aaec1489b00f24ebef4ae5b1da598091275e1)
* anv: Separate compute and graphics descriptor setsJason Ekstrand2018-01-264-32/+70
| | | | | | | | | | | | | | | | | | | The Vulkan spec says: "pipelineBindPoint is a VkPipelineBindPoint indicating whether the descriptors will be used by graphics pipelines or compute pipelines. There is a separate set of bind points for each of graphics and compute, so binding one does not disturb the other." Up until now, we've been ignoring the pipeline bind point and had just one bind point for everything. This commit separates things out into separate bind points. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102897 Cc: "18.0" <[email protected]> (cherry picked from commit 97f96610c8b858267c121c0ad6ffc630e2aafc09)
* anv/cmd_buffer: Use anv_descriptor_for_binding for samplersJason Ekstrand2018-01-261-4/+2
| | | | | | | Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 31b2144c836485ef6476bd455f1c02b96deafab7)
* anv/cmd_buffer: Add a helper for binding descriptor setsJason Ekstrand2018-01-261-28/+42
| | | | | | | | | | This lets us unify some code between push descriptors and regular descriptors. It doesn't do much for us yet but it will. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit b9e1ca16f84016f1d40efa9bfee89db48a7702b4)
* anv/cmd_buffer: Refactor ensure_push_descriptor_setJason Ekstrand2018-01-261-11/+13
| | | | | | | | | | | | It's now a function which returns the push descriptor set. Since we set the error on the command buffer, returning the error is a little redundant. Returning the descriptor set (or NULL on error) is more convenient. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 90cceaa9dd3b12e039a131a50c6866dce04e7fb2)
* anv: Remove semicolons from vk_error[f] definitionsJason Ekstrand2018-01-261-2/+2
| | | | | | | | | | With the semicolons, they can't be used in a function argument without throwing syntax errors. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit d5592e2fdaa9ce8b98d38b2d29e2a7d2c4abda08)
* anv/cmd_buffer: Add substructs to anv_cmd_state for graphics and computeJason Ekstrand2018-01-265-32/+74
| | | | | | | | | Initially, these just contain the pipeline in a base struct. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 9af5379228d7be9c7ea41e0912a8770d28ead92b)
* anv/cmd_buffer: Use some pre-existing pipeline temporariesJason Ekstrand2018-01-262-7/+5
| | | | | | | | | | | There are several places where we'd already saved the pipeline off to a temporary variable but, due to an artifact of history, weren't actually using that temporary everywhere. No functional change. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit ddc2d285484a1607f79ffeb2fc6c09367c6aea1f)
* anv/cmd_buffer: Rework anv_cmd_state_resetJason Ekstrand2018-01-261-38/+22
| | | | | | | | | | | | This splits anv_cmd_state_reset into separate init and finish functions. This lets us share init code with cmd_buffer_create. This potentially fixes subtle bugs where we may have missed some bit of state that needs to get initialized on command buffer creation. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit cd3feea74582cea2d18306d167609f4fbe681bb3)
* anv/cmd_buffer: Get rid of the meta query workaroundJason Ekstrand2018-01-263-16/+0
| | | | | | | | | Meta has been gone for a long time. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit d6c9a89d1324ed2c723cbd3c6d8390691c58dfd2)
* anv/cmd_state: Drop the scratch_size fieldJason Ekstrand2018-01-261-1/+0
| | | | | | | | | | This is a legacy left-over from the mechanism we used to use to handle scratch. The new (and better) mechanism doesn't use this. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit bc0a21e34811e0e1542236dbaf5fb1fa56bbb98c)
* anv/pipeline: Don't assert on more than 32 samplersJason Ekstrand2018-01-261-1/+7
| | | | | | | | | This prevents an assert when running one unreleased Vulkan game. Tested-by: Józef Kucia <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Cc: "18.0" <[email protected]> (cherry picked from commit 4b69ba381766cd911eb1284f1b0332a139ec8a75)
* automake: small cleanup after the meson.build inclusion18.0-branchpointEmil Velikov2018-01-234-5/+4
| | | | | | | | Namely extend the EXTRA_DIST list, instead of re-assigning it and bring back a file dropped by mistake. Fixes: 436ed65d38d ("autotools: include meson build files in tarball") Signed-off-by: Emil Velikov <[email protected]>
* automake: anv: ship anv_extensions_gen.py in the tarballEmil Velikov2018-01-231-0/+1
| | | | | | Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables") Signed-off-by: Emil Velikov <[email protected]>
* automake: vc5: remove non-applicable v3dx_simulator.hEmil Velikov2018-01-231-1/+0
| | | | Signed-off-by: Emil Velikov <[email protected]>
* ac/nir: Use instance_rate_inputs per attribute, not per variable.Bas Nieuwenhuizen2018-01-231-14/+13
| | | | | | | | | | This did the wrong thing if we had e.g. an array for which only some of the attributes use the instance index. Tripped up some new CTS tests. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* anv: Return trampoline entrypoints from GetInstanceProcAddrJason Ekstrand2018-01-232-1/+50
| | | | | | | | | | | | | | | | | | | | Technically, the Vulkan spec requires that we return valid entrypoints for all core functionality and any available device extensions. This means that, for gen-specific functions, we need to return a trampoline which looks at the device and calls the right device function. In 99% of cases, the loader will do this for us but, aparently, we're supposed to do it too. It's a tiny increase in binary size for us to carry this around but really not bad. Before: text data bss dec hex filename 3541775 204112 6136 3752023 394057 libvulkan_intel.so After: text data bss dec hex filename 3551463 205632 6136 3763231 396c1f libvulkan_intel.so Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Use an named tuple for paramsJason Ekstrand2018-01-231-11/+23
| | | | | | This allows us to store a bit more detailed data per-param Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Only advertise enabled entrypointsJason Ekstrand2018-01-233-6/+74
| | | | | | | | | The Vulkan spec annoyingly requires us to track what core version and what all extensions are enabled and only advertise those entrypoints. Any call to vkGet*ProcAddr for an entrypoint for an extension the client has not explicitly enabled is supposed to return NULL. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-device dispatch tableJason Ekstrand2018-01-232-1/+44
| | | | | | We also switch GetDeviceProcAddr over to use it. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-instance dispatch tableJason Ekstrand2018-01-232-1/+7
| | | | | | We also switch GetInstanceProcAddr over to use it. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Properly NULL for GetInstanceProcAddr with a null instanceJason Ekstrand2018-01-231-1/+23
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/extensions: Fix VkVersion::c_vk_version for patch == NoneJason Ekstrand2018-01-231-1/+2
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Parse entrypoints before extensions/featuresJason Ekstrand2018-01-231-15/+17
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Expose the different dispatch tablesJason Ekstrand2018-01-231-8/+12
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Split entrypoint index lookup into its own functionJason Ekstrand2018-01-232-5/+16
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Add a LAYERS helper variableJason Ekstrand2018-01-231-7/+15
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/entrypoints: Add an Entrypoint classJason Ekstrand2018-01-231-50/+63
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-device table of enabled extensionsJason Ekstrand2018-01-232-0/+5
| | | | | | Nothing uses this at the moment, but we will need it soon. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Use tables for device extension wranglingJason Ekstrand2018-01-233-32/+49
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Add a per-instance table of enabled extensionsJason Ekstrand2018-01-232-0/+6
| | | | | | Nothing needs this yet but we will want it later. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Use tables for instance extension wranglingJason Ekstrand2018-01-233-31/+34
| | | | | | | This lets us move a bunch of stuff out of codegen and back into anv_device.c which is a bit nicer. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>