rsx: Implement stencil mirror views

- Implements a mirror view of D24S8 data that accesses the stencil components.
  Finishes the implementation of TEX2D_DEPTH_RGBA as the stencil component was previously missing from the reconstructed data
- Add a few missing destructors
  Image classes are inherited a lot and I forgot to make the dtors virtual
This commit is contained in:
kd-11 2018-11-24 15:54:46 +03:00 committed by kd-11
parent 696b91cb9b
commit 4b79ef1ad9
19 changed files with 401 additions and 156 deletions

View file

@ -141,9 +141,24 @@ void VKFragmentDecompilerThread::insertConstants(std::stringstream & OS)
inputs.push_back(in);
OS << "layout(set=0, binding=" << location++ << ") uniform " << samplerType << " " << PI.name << ";\n";
if (m_prog.redirected_textures & mask)
{
// Insert stencil mirror declaration
in.name += "_stencil";
in.location = location;
inputs.push_back(in);
OS << "layout(set=0, binding=" << location++ << ") uniform u" << PT.type << " " << in.name << ";\n";
}
}
}
// Some drivers (macOS) do not support more than 16 texture descriptors per stage
// TODO: If any application requires more than this, the layout can be restructured a bit
verify("Too many sampler descriptors!" HERE), location <= VERTEX_TEXTURES_FIRST_BIND_SLOT;
std::string constants_block;
for (const ParamType& PT : m_parr.params[PF_PARAM_UNIFORM])
{