Refactor public interface around handling of textures

* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
This commit is contained in:
baldurk
2019-10-30 17:14:12 +00:00
parent 01344c7e83
commit db563bb0bf
46 changed files with 1449 additions and 1457 deletions
+1 -3
View File
@@ -62,8 +62,7 @@ void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_
rdcarray<TextureDescription> texs = renderer->GetTextures();
TextureDisplay d;
d.mip = 0;
d.sampleIdx = ~0U;
d.subresource = {0, 0, ~0U};
d.overlay = DebugOverlay::NoOverlay;
d.typeCast = CompType::Typeless;
d.customShaderId = ResourceId();
@@ -75,7 +74,6 @@ void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_
d.scale = 1.0f;
d.xOffset = 0.0f;
d.yOffset = 0.0f;
d.sliceFace = 0;
d.rawOutput = false;
d.red = d.green = d.blue = true;
d.alpha = false;