-
Notifications
You must be signed in to change notification settings - Fork 34
Add support for 64-bit formats. #1302
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,10 @@ enum class Format { | |
| RGBA32Sint, | ||
| RGBA32Uint, | ||
| RGBA32Float, | ||
| R64Uint, | ||
| R64Sint, | ||
| RG64Uint, | ||
| RG64Sint, | ||
| D32Float, | ||
| D32FloatS8Uint, | ||
| }; | ||
|
|
@@ -85,6 +89,14 @@ inline llvm::StringRef getFormatName(Format Format) { | |
| return "RGBA32Uint"; | ||
| case Format::RGBA32Float: | ||
| return "RGBA32Float"; | ||
| case Format::R64Uint: | ||
| return "R64Uint"; | ||
| case Format::R64Sint: | ||
| return "R64Sint"; | ||
| case Format::RG64Uint: | ||
| return "RG64Uint"; | ||
| case Format::RG64Sint: | ||
| return "RG64Sint"; | ||
| case Format::D32Float: | ||
| return "D32Float"; | ||
| case Format::D32FloatS8Uint: | ||
|
|
@@ -112,12 +124,16 @@ inline uint32_t getFormatSizeInBytes(Format Format) { | |
| case Format::RG32Uint: | ||
| case Format::RG32Float: | ||
| case Format::D32FloatS8Uint: | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| return 8; | ||
| case Format::RGB32Float: | ||
| return 12; | ||
| case Format::RGBA32Sint: | ||
| case Format::RGBA32Uint: | ||
| case Format::RGBA32Float: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
| return 16; | ||
| } | ||
| llvm_unreachable("All Format cases handled"); | ||
|
|
@@ -141,6 +157,10 @@ inline bool isDepthFormat(Format Format) { | |
| case Format::RGBA32Sint: | ||
| case Format::RGBA32Uint: | ||
| case Format::RGBA32Float: | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
| return false; | ||
| case Format::D32Float: | ||
| case Format::D32FloatS8Uint: | ||
|
|
@@ -167,6 +187,10 @@ inline bool isStencilFormat(Format Format) { | |
| case Format::RGBA32Sint: | ||
| case Format::RGBA32Uint: | ||
| case Format::RGBA32Float: | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
| case Format::D32Float: | ||
| return false; | ||
| case Format::D32FloatS8Uint: | ||
|
|
@@ -199,6 +223,11 @@ inline bool isTextureCompatible(Format Format) { | |
| case Format::RGBA32Float: | ||
| case Format::D32Float: | ||
| case Format::D32FloatS8Uint: | ||
| // Only for RWTextures | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
|
Comment on lines
+226
to
+230
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then should we have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. Like you can still have an SRV for these and load it as a regular texture, but you can't use a sampler on it from what I understand. It's one of these edge cases where there is no clear yes/no answer on 'can we create a texture with this format'. |
||
| return true; | ||
| } | ||
| llvm_unreachable("All Format cases handled"); | ||
|
|
@@ -224,6 +253,10 @@ inline bool isVertexCompatible(Format Format) { | |
| case Format::RGBA32Uint: | ||
| case Format::RGBA32Float: | ||
| return true; | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
| case Format::D32Float: | ||
| case Format::D32FloatS8Uint: | ||
| return false; | ||
|
|
@@ -253,6 +286,10 @@ inline bool isPositionCompatible(Format Format) { | |
| case Format::RG32Uint: | ||
| case Format::RGBA32Sint: | ||
| case Format::RGBA32Uint: | ||
| case Format::R64Uint: | ||
| case Format::R64Sint: | ||
| case Format::RG64Uint: | ||
| case Format::RG64Sint: | ||
| case Format::D32Float: | ||
| case Format::D32FloatS8Uint: | ||
| return false; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.