mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-14 09:45:47 +00:00
Combine and compress some of the data tables in the D3D11 pipe view
* e.g. class instances only crazy people use, so there's no point to have it eating up a ton of space when 99.9% of the time it's empty. Also the border colour in samplers is only listed if the addressing is set to use the border colour. * I also collapsed down some of the columns to make it a little simpler visually, like min lod/max lod become just "lod clamp" with a range, and constant buffers simplified down to a couple of columns.
This commit is contained in:
@@ -118,13 +118,17 @@ struct D3D11PipelineState
|
||||
|
||||
struct Sampler
|
||||
{
|
||||
Sampler() : Samp(), MaxAniso(0), MaxLOD(0.0f), MinLOD(0.0f), MipLODBias(0.0f)
|
||||
Sampler()
|
||||
: Samp(), MaxAniso(0), MaxLOD(0.0f), MinLOD(0.0f), MipLODBias(0.0f)
|
||||
, UseBorder(false), UseComparison(false)
|
||||
{ BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 0.0f; }
|
||||
ResourceId Samp;
|
||||
rdctype::str AddressU, AddressV, AddressW;
|
||||
float BorderColor[4];
|
||||
rdctype::str Comparison;
|
||||
rdctype::str Filter;
|
||||
bool32 UseBorder;
|
||||
bool32 UseComparison;
|
||||
uint32_t MaxAniso;
|
||||
float MaxLOD;
|
||||
float MinLOD;
|
||||
|
||||
@@ -1591,14 +1591,14 @@ string ToStrHelper<false, D3D11_COMPARISON_FUNC>::Get(const D3D11_COMPARISON_FUN
|
||||
{
|
||||
switch(el)
|
||||
{
|
||||
case D3D11_COMPARISON_NEVER: return "NEVER";
|
||||
case D3D11_COMPARISON_LESS: return "LESS";
|
||||
case D3D11_COMPARISON_EQUAL: return "EQUAL";
|
||||
case D3D11_COMPARISON_LESS_EQUAL: return "LESS_EQUAL";
|
||||
case D3D11_COMPARISON_GREATER: return "GREATER";
|
||||
case D3D11_COMPARISON_NOT_EQUAL: return "NOT_EQUAL";
|
||||
case D3D11_COMPARISON_GREATER_EQUAL: return "GREATER_EQUAL";
|
||||
case D3D11_COMPARISON_ALWAYS: return "ALWAYS";
|
||||
case D3D11_COMPARISON_NEVER: return "NEVER";
|
||||
case D3D11_COMPARISON_LESS: return "LESS";
|
||||
case D3D11_COMPARISON_EQUAL: return "EQUAL";
|
||||
case D3D11_COMPARISON_LESS_EQUAL: return "LESS_EQUAL";
|
||||
case D3D11_COMPARISON_GREATER: return "GREATER";
|
||||
case D3D11_COMPARISON_NOT_EQUAL: return "NOT_EQUAL";
|
||||
case D3D11_COMPARISON_GREATER_EQUAL: return "GREATER_EQUAL";
|
||||
case D3D11_COMPARISON_ALWAYS: return "ALWAYS";
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
@@ -534,10 +534,17 @@ D3D11PipelineState D3D11Replay::MakePipelineState()
|
||||
|
||||
samp.Comparison = ToStr::Get(desc.ComparisonFunc);
|
||||
samp.Filter = ToStr::Get(desc.Filter);
|
||||
samp.MaxAniso = desc.MaxAnisotropy;
|
||||
samp.MaxAniso = 0;
|
||||
if(desc.Filter == D3D11_FILTER_ANISOTROPIC || desc.Filter == D3D11_FILTER_COMPARISON_ANISOTROPIC)
|
||||
samp.MaxAniso = desc.MaxAnisotropy;
|
||||
samp.MaxLOD = desc.MaxLOD;
|
||||
samp.MinLOD = desc.MinLOD;
|
||||
samp.MipLODBias = desc.MipLODBias;
|
||||
samp.UseComparison = (desc.Filter >= D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT);
|
||||
samp.UseBorder =
|
||||
(desc.AddressU == D3D11_TEXTURE_ADDRESS_BORDER ||
|
||||
desc.AddressV == D3D11_TEXTURE_ADDRESS_BORDER ||
|
||||
desc.AddressW == D3D11_TEXTURE_ADDRESS_BORDER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user