Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VKRT | git apply - patch does not apply #1449

Closed
A31Nesta opened this issue Sep 14, 2022 · 10 comments
Closed

VKRT | git apply - patch does not apply #1449

A31Nesta opened this issue Sep 14, 2022 · 10 comments
Labels

Comments

@A31Nesta
Copy link

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 A31Nesta added the bug label Sep 14, 2022
@NicTanghe
Copy link

NicTanghe commented Oct 8, 2022

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
Copy link
Author

A31Nesta commented Oct 8, 2022

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

@NicTanghe
Copy link

Im here to ask plz open ticket #1458

@rpaladin
Copy link

rpaladin commented Dec 6, 2022

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

@lylythechosenone
Copy link

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

@Razzaline
Copy link

Razzaline commented Jun 29, 2023

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
Copy link

lylythechosenone commented Jun 29, 2023 via email

@Razzaline
Copy link

Razzaline commented Jun 30, 2023

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
Copy link

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

@luboslenco
Copy link
Member

Fixed now! Thanks for reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants