armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.23k stars 334 forks source link

VKRT | git apply - patch does not apply #1449

Closed A31Nesta closed 10 months ago

A31Nesta commented 2 years ago

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:

The error happens after executing the git apply command.

NicTanghe commented 1 year ago

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
A31Nesta commented 1 year ago

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

NicTanghe commented 1 year ago

Im here to ask plz open ticket #1458

rpaladin commented 1 year ago

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

lylythechosenone commented 1 year ago

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

Razzaline commented 1 year ago

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'
lylythechosenone commented 1 year ago

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: @.***>

Razzaline commented 1 year ago

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).

NicTanghe commented 1 year ago

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

luboslenco commented 10 months ago

Fixed now! Thanks for reports.