Skip to content

BREAKING: changed zd3d12 create*ShaderPipeline and MipmapGenerator to require shader bytecode #559

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

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

Pyrolistical
Copy link
Contributor

Removes all std.fs.openFileAbsolute out of zd3d12.zig, but there still remain indirect file loading via gctx.wic_factory.CreateDecoderFromFilename and dds_loading.zig

Can be improved by extracting csGenerateMipmaps out of samples/common/src/hlsl/common.hsls and put it into zd3d12 with a shader compilation step template.

fixes #556

desc instead of zd3d12 reaching out to read files.
BREAKING: changed zd3d12 MipmapGenerator to require bytecode to be
passed in instead of zd3d12 reaching out to read files.

zd3d12 create*ShaderPipeline now generates the root signature if
pRootSignature is null on desc

fixes zig-gamedev#556
@hazeycode hazeycode added the breaking Indicates an API breaking change label Apr 15, 2024
@hazeycode
Copy link
Member

Can be improved by extracting csGenerateMipmaps out of samples/common/src/hlsl/common.hsls and put it into zd3d12 with a shader compilation step template.

Agreed. Generally, I think we should be making samples/common smaller/non-existent.

@hazeycode hazeycode merged commit 6eb7ae9 into zig-gamedev:main Apr 15, 2024
@Pyrolistical Pyrolistical deleted the zd3d12-remove-fs branch April 15, 2024 21:26
@Pyrolistical
Copy link
Contributor Author

Agreed. Generally, I think we should be making samples/common smaller/non-existent.

Ah, this explains a lot. common used to be a lib: ff9bf9f

@Pyrolistical
Copy link
Contributor Author

@hazeycode do you know why all the windows d3d12 samples common imgui/vectormath instead of zgui/zmath?

for example

const vm = common.vectormath;
const GuiRenderer = common.GuiRenderer;

@hazeycode
Copy link
Member

hazeycode commented Apr 15, 2024

do you know why all the windows d3d12 samples common imgui/vectormath instead of zgui/zmath?

Seems to be old code used by original Windows only version of zig-gamedev.

I started on a win32_dx12 zgui backend so that the common imgui can be dropped... I'll dig that out.

@michal-z
Copy link
Collaborator

do you know why all the windows d3d12 samples common imgui/vectormath instead of zgui/zmath?

Seems to be old code used by original Windows only version of zig-gamedev.

Yes, exactly. D3D12 samples were written when zmath and zgui libs haven't existed yet.

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

Successfully merging this pull request may close these issues.

zd3d12 lib MipmapGenerator depends on sample
3 participants