Skip to content

Commit

Permalink
Vulkan rt fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Feb 7, 2025
1 parent 861668f commit 50e4a27
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions armorcore/sources/iron.h
Original file line number Diff line number Diff line change
Expand Up @@ -2859,15 +2859,18 @@ void iron_raytrace_set_textures(image_t *tex0, image_t *tex1, image_t *tex2, kin
kinc_g4_render_target_t *texpaint0_rt = texpaint0_image->render_target_;

if (texpaint0_tex != NULL) {
#ifdef KINC_DIRECT3D12
kinc_g4_texture_t *texture = texpaint0_tex;
if (!texture->impl._uploaded) {
kinc_g5_command_list_upload_texture(&commandList, &texture->impl._texture);
texture->impl._uploaded = true;
}
texpaint0 = (kinc_g4_render_target_t *)malloc(sizeof(kinc_g4_render_target_t));
#ifdef KINC_DIRECT3D12
texpaint0->impl._renderTarget.impl.srvDescriptorHeap = texture->impl._texture.impl.srvDescriptorHeap;
#endif
#ifdef KINC_VULKAN
texpaint0->impl._renderTarget.impl.sourceView = texture->impl._texture.impl.texture.view;
#endif
}
else {
texpaint0 = texpaint0_rt;
Expand All @@ -2878,15 +2881,18 @@ void iron_raytrace_set_textures(image_t *tex0, image_t *tex1, image_t *tex2, kin
kinc_g4_render_target_t *texpaint1_rt = texpaint1_image->render_target_;

if (texpaint1_tex != NULL) {
#ifdef KINC_DIRECT3D12
kinc_g4_texture_t *texture = texpaint1_tex;
if (!texture->impl._uploaded) {
kinc_g5_command_list_upload_texture(&commandList, &texture->impl._texture);
texture->impl._uploaded = true;
}
texpaint1 = (kinc_g4_render_target_t *)malloc(sizeof(kinc_g4_render_target_t));
#ifdef KINC_DIRECT3D12
texpaint1->impl._renderTarget.impl.srvDescriptorHeap = texture->impl._texture.impl.srvDescriptorHeap;
#endif
#ifdef KINC_VULKAN
texpaint1->impl._renderTarget.impl.sourceView = texture->impl._texture.impl.texture.view;
#endif
}
else {
texpaint1 = texpaint1_rt;
Expand All @@ -2897,15 +2903,18 @@ void iron_raytrace_set_textures(image_t *tex0, image_t *tex1, image_t *tex2, kin
kinc_g4_render_target_t *texpaint2_rt = texpaint2_image->render_target_;

if (texpaint2_tex != NULL) {
#ifdef KINC_DIRECT3D12
kinc_g4_texture_t *texture = (kinc_g4_texture_t *)texpaint2_tex;
if (!texture->impl._uploaded) {
kinc_g5_command_list_upload_texture(&commandList, &texture->impl._texture);
texture->impl._uploaded = true;
}
texpaint2 = (kinc_g4_render_target_t *)malloc(sizeof(kinc_g4_render_target_t));
#ifdef KINC_DIRECT3D12
texpaint2->impl._renderTarget.impl.srvDescriptorHeap = texture->impl._texture.impl.srvDescriptorHeap;
#endif
#ifdef KINC_VULKAN
texpaint2->impl._renderTarget.impl.sourceView = texture->impl._texture.impl.texture.view;
#endif
}
else {
texpaint2 = texpaint2_rt;
Expand Down

0 comments on commit 50e4a27

Please sign in to comment.