Skip to content

Commit

Permalink
Make render targets work
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 17, 2024
1 parent dd3d838 commit 5620fca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ void kope_d3d12_device_create_texture(kope_g5_device *device, const kope_g5_text
desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
desc.Flags = D3D12_RESOURCE_FLAG_NONE;

if ((parameters->usage & KONG_G5_TEXTURE_USAGE_RENDER_ATTACHMENT) != 0) {
desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
}

if ((parameters->usage & KONG_G5_TEXTURE_USAGE_READ_WRITE) != 0) {
desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ void kope_d3d12_compute_pipeline_destroy(kope_d3d12_compute_pipeline *pipe) {
}
}

#ifndef KONG_HAS_NO_RAY_SHADERS
void kope_d3d12_ray_pipeline_init(kope_g5_device *device, kope_d3d12_ray_pipeline *pipe, const kope_d3d12_ray_pipeline_parameters *parameters,
ID3D12RootSignature *root_signature) {
D3D12_DXIL_LIBRARY_DESC lib = {0};
Expand Down Expand Up @@ -457,3 +458,4 @@ void kope_d3d12_ray_pipeline_destroy(kope_d3d12_ray_pipeline *pipe) {
pipe->pipe = NULL;
}
}
#endif

0 comments on commit 5620fca

Please sign in to comment.