armortools icon indicating copy to clipboard operation
armortools copied to clipboard

VKRT | git apply - patch does not apply

Open A31Nesta opened this issue 2 years ago • 2 comments

OS/device including version: Arch Linux | Linux 5.15.67-1-lts (64 bits)

Issue description: Can't apply patch trying to build with Vulkan Path Tracing. It says patch does not apply. I also tried using --3way. With that I managed to get the patch to apply except for the Vulkan.c.h file. The output is:

error: patch failed: Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h:53 error: Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h: patch does not apply

From reading that I got that there was an issue in line 53 so I checked it and I saw that it's an empty line between two lines that appear to be perfectly fine: 52 | kinc_g5_render_target_t *vulkanRenderTargets[16] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; 53 | 54 | static bool began = false;

Steps to reproduce:

  • Follow the instructions:
    • git clone --recursive https://github.com/armory3d/armorpaint
    • cd armorpaint
  • Follow the instructions for VKRT:
    • git clone --recursive https://github.com/armory3d/glsl_to_spirv armorcore/Libraries/glsl_to_spirv
    • git apply armorcore/patch/vulkan_raytrace.diff --directory=armorcore/Kinc

The error happens after executing the git apply command.

A31Nesta avatar Sep 14 '22 16:09 A31Nesta

Could this be the same issue I`m ruinning into with this ?

(fedora 36)

armorpaint on  main via  took 10s
❯ git apply armorcore/patch/vulkan_raytrace.diff --directory=armorcore/Kinc
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h:53
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h: patch does not apply
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h:11
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h: patch does not apply
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/indexbuffer.c.h:21
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/indexbuffer.c.h: patch does not apply
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h:2
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h: patch does not apply
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h:48
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h: patch does not apply
error: patch failed: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vertexbuffer.c.h:27
error: armorcore/Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vertexbuffer.c.h: patch does not apply

NicTanghe avatar Oct 08 '22 22:10 NicTanghe

Yes, it's the same error. Everything was cloned as it should but the patch doesn't apply.

A31Nesta avatar Oct 08 '22 23:10 A31Nesta

Im here to ask plz open ticket #1458

NicTanghe avatar Dec 06 '22 15:12 NicTanghe

@NicTanghe since you self-closed your own issue, Github still allows you to reopen it yourself. 🙂

rpaladin avatar Dec 06 '22 17:12 rpaladin

What's the status on this? It's been over 6 months now since the last comment.

lylythechosenone avatar Jun 19 '23 13:06 lylythechosenone

vulkan_raytrace.txt I made an attempt to update it with my limited knowledge, but I'm sure there are plenty of problems.

I get these errors when trying to compile with the new patch:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:1098:7)
    at node:kmake/Project:106:45
    at new Promise (<anonymous>)
    at loadProject (node:kmake/Project:73:12)
    at Project.addProject (node:kmake/Project:635:31)
    at Object.flags.on_project_created (eval at <anonymous> (eval at <anonymous> (node:kmake/Project:109:27)), <anonymous>:18:17)
    at eval (eval at <anonymous> (node:kmake/Project:109:27), <anonymous>:238:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Error: kfile did not call resolve, no project created.
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:1098:7)
    at node:kmake/Project:106:45
    at new Promise (<anonymous>)
    at loadProject (node:kmake/Project:73:12)
    at Project.addProject (node:kmake/Project:635:31)
    at Object.flags.on_project_created (eval at <anonymous> (eval at <anonymous> (node:kmake/Project:109:27)), <anonymous>:18:17)
    at eval (eval at <anonymous> (node:kmake/Project:109:27), <anonymous>:238:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'

Razzaline avatar Jun 29 '23 19:06 Razzaline

I get the same error even without the patch. See #1585.

On Thu, Jun 29, 2023 at 3:20 PM Razzaline @.***> wrote:

vulkan_raytrace.txt https://github.com/armory3d/armortools/files/11909693/vulkan_raytrace.txt I made an attempt to update it with my limited knowledge, but I'm sure there are plenty of problems.

I get these errors when trying to compile with the new patch:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at new NodeError (node:internal/errors:372:5) at validateString (node:internal/validators:119:11) at Object.resolve (node:path:1098:7) at node:kmake/Project:106:45 at new Promise () at loadProject (node:kmake/Project:73:12) at Project.addProject (node:kmake/Project:635:31) at Object.flags.on_project_created (eval at (eval at (node:kmake/Project:109:27)), :18:17) at eval (eval at (node:kmake/Project:109:27), :238:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_INVALID_ARG_TYPE' } Error: kfile did not call resolve, no project created. node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at new NodeError (node:internal/errors:372:5) at validateString (node:internal/validators:119:11) at Object.resolve (node:path:1098:7) at node:kmake/Project:106:45 at new Promise () at loadProject (node:kmake/Project:73:12) at Project.addProject (node:kmake/Project:635:31) at Object.flags.on_project_created (eval at (eval at (node:kmake/Project:109:27)), :18:17) at eval (eval at (node:kmake/Project:109:27), :238:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_INVALID_ARG_TYPE'

— Reply to this email directly, view it on GitHub https://github.com/armory3d/armortools/issues/1449#issuecomment-1613675363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVFKGM3HE6ZVUXIZFCMRCLXNXIQVANCNFSM6AAAAAAQMTGS4U . You are receiving this because you commented.Message ID: @.***>

lylythechosenone avatar Jun 29 '23 23:06 lylythechosenone

Huh, okay... so maybe it's not my patch then? Sadly the errors aren't very helpful, and I don't know how to troubleshoot from here if it doesn't point me to where the error is occurring.

I only get those errors you have with the OpenGL build when trying to build the Vulkan version unpatched, though (but not with the OpenGL one; it compiles and runs just fine).

Razzaline avatar Jun 30 '23 01:06 Razzaline

Can someone test to c if Razzline`s patch works with clang 14 ?

NicTanghe avatar Sep 08 '23 11:09 NicTanghe

Fixed now! Thanks for reports.

luboslenco avatar Oct 28 '23 07:10 luboslenco