[D3D12] DXBC part of signed textures

This commit is contained in:
Triang3l
2018-10-09 08:31:09 +03:00
parent 6a6e63060b
commit 7603de218b
4 changed files with 313 additions and 218 deletions

View File

@@ -35,6 +35,8 @@ void D3D12Shader::SetTexturesAndSamplers(
const DxbcShaderTranslator::TextureSRV& translator_srv = texture_srvs[i];
srv.fetch_constant = translator_srv.fetch_constant;
srv.dimension = translator_srv.dimension;
srv.is_signed = translator_srv.is_signed;
srv.is_sign_required = translator_srv.is_sign_required;
texture_srvs_.push_back(srv);
used_texture_mask_ |= 1u << translator_srv.fetch_constant;
}

View File

@@ -39,6 +39,10 @@ class D3D12Shader : public Shader {
struct TextureSRV {
uint32_t fetch_constant;
TextureDimension dimension;
bool is_signed;
// Whether this SRV must be bound even if it's signed and all components are
// unsigned and vice versa.
bool is_sign_required;
};
const TextureSRV* GetTextureSRVs(uint32_t& count_out) const {
count_out = uint32_t(texture_srvs_.size());