Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Error logging in D3D12 functions #353

Open
Nielsbishere opened this issue Jun 3, 2019 · 4 comments
Open

Error logging in D3D12 functions #353

Nielsbishere opened this issue Jun 3, 2019 · 4 comments
Labels
refactor Request to re-factor a working system/class/etc.

Comments

@Nielsbishere
Copy link
Contributor

Is your request related to a problem? Please describe.
Most d3d12 functions don't do error checking.

Describe the solution you'd like
For example mapping a buffer should use a function similar to Microsoft example code (ThrowIfError). Turning a HRESULT and outputting it to log.

Describe alternatives you've considered
Additional context
N.A.

@VZout
Copy link
Contributor

VZout commented Jun 4, 2019

We do do error checking. TRY and TRY_M.

@Nielsbishere
Copy link
Contributor Author

Yeah but not everywhere, an example is in mapping/unmapping memory. If this fails, it memcpys into a nullptr. Might be good to have it for debugging, because mapping memory fails if there's no shared memory left.

@VZout VZout added the refactor Request to re-factor a working system/class/etc. label Jun 10, 2019
@VZout
Copy link
Contributor

VZout commented Jun 11, 2019

in the case of mapping and unmapping it shouldn't do error handling. the caller should do the error handling. that way you don't need to do as many checks,.

@Nielsbishere
Copy link
Contributor Author

I'd rather have 1 compare and added safety than saving that and having to do it in the caller

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor Request to re-factor a working system/class/etc.
Projects
None yet
Development

No branches or pull requests

2 participants