diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-03-27 00:02:24 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-04-08 17:28:44 +0200 |
commit | ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6 (patch) | |
tree | 05563ef525c4f8b177f1d797de9fdb06e467e622 /src/video_core/engines/shader_bytecode.h | |
parent | Fixes to Const Buffer Accessor and Formatting (diff) | |
download | yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar.gz yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar.bz2 yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar.lz yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar.xz yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.tar.zst yuzu-ac3ba9a33e0d1e14061fc0f341b69cb85ea2e6a6.zip |
Diffstat (limited to 'src/video_core/engines/shader_bytecode.h')
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 2edd3245e..71c22aff0 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -967,6 +967,38 @@ union Instruction { } tex; union { + BitField<28, 1, u64> array; + BitField<29, 2, TextureType> texture_type; + BitField<31, 4, u64> component_mask; + BitField<49, 1, u64> nodep_flag; + BitField<50, 1, u64> dc_flag; + BitField<36, 1, u64> aoffi_flag; + BitField<37, 3, TextureProcessMode> process_mode; + + bool IsComponentEnabled(std::size_t component) const { + return ((1ull << component) & component_mask) != 0; + } + + TextureProcessMode GetTextureProcessMode() const { + return process_mode; + } + + bool UsesMiscMode(TextureMiscMode mode) const { + switch (mode) { + case TextureMiscMode::DC: + return dc_flag != 0; + case TextureMiscMode::NODEP: + return nodep_flag != 0; + case TextureMiscMode::AOFFI: + return aoffi_flag != 0; + default: + break; + } + return false; + } + } tex_b; + + union { BitField<22, 6, TextureQueryType> query_type; BitField<31, 4, u64> component_mask; BitField<49, 1, u64> nodep_flag; |