Skip to content
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

HLSL: Add min*{float,int,uint} types #570

Merged
merged 1 commit into from Nov 1, 2016
Merged

HLSL: Add min*{float,int,uint} types #570

merged 1 commit into from Nov 1, 2016

Conversation

ghost
Copy link

@ghost ghost commented Oct 27, 2016

These HLSL types are guaranteed to have at least the given number of bits, but may have more.

min{16,10}float is mapped to EbtFloat16 with medium precision -> SPIR-V RelaxedPrecision.
min{16,12}int and min16uint are mapped to mediump -> SPIR-V RelaxedPrecision

@johnkslang
Copy link
Member

Today, we need to map min16 to SPIR-V 32-bit types with RelaxedPrecision.

@ghost ghost changed the title WIP: HLSL: Add min*{float,int,uint} types HLSL: Add min*{float,int,uint} types Oct 28, 2016
@ghost
Copy link
Author

ghost commented Oct 28, 2016

Changed to relaxed precision float32 for min float types, removed WIP.

break;

case EHTokMin10float:
new(&type) TType(min10float_bt, EvqTemporary, EpqLow); // equiv to Medium when generating SPIR-V:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify that lowp is sufficient for min10?

(It may be irrelevant if this is only for SPIR-V, but then, if that's the case mediump would work everywhere without needing to know if lowp is okay.)

These HLSL types are guaranteed to have at least the given number of bits, but may have more.

min{16,10}float is mapped to EbtFloat at medium precision -> SPIRV RelaxedPrecision
min{16,12}int and min16uint are mapped to mediump -> SPIR-V RelaxedPrecision
@ghost
Copy link
Author

ghost commented Oct 31, 2016

I didn't find an explicit precision for lowp (nor mediump, except for how it maps to the SPIR-V RelaxedPrecision decoration). I changed the PR to use mediump for safety, for all the new types.

@johnkslang johnkslang merged commit 909b8af into KhronosGroup:master Nov 1, 2016
@ghost ghost mentioned this pull request Nov 13, 2016
51 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant