Fix minor issues

This commit is contained in:
Wojtek Figat
2026-02-26 15:52:41 +01:00
parent 8728d88dde
commit 63f19aa4d6
3 changed files with 3 additions and 3 deletions

View File

@@ -334,5 +334,5 @@ API_STRUCT(NoDefault) struct GPULimits
/// <summary>
/// The maximum degree of anisotropic filtering used for texture sampling.
/// </summary>
API_FIELD() float MaximumSamplerAnisotropy = 0.0f;
API_FIELD() float MaximumSamplerAnisotropy = 1.0f;
};

View File

@@ -743,7 +743,7 @@ void GPUContextWebGPU::OnDrawCall()
for (int32 i = _pendingClears.Count() - 1; i >= 0; i--)
{
auto clear = _pendingClears[i];
if (clear.View != _depthStencil && SpanContains(renderTargets, clear.View))
if (clear.View != _depthStencil && !SpanContains(renderTargets, clear.View))
{
ManualClear(clear);
_pendingClears.RemoveAt(i);

View File

@@ -102,4 +102,4 @@ class RendererPass : public Singleton<T>, public RendererPassBase
};
#define REPORT_INVALID_SHADER_PASS_CB_SIZE(shader, index, dataType) LOG(Fatal, "Shader {0} has incorrect constant buffer {1} size: {2} bytes. Expected: {3} bytes", shader->ToString(), index, shader->GetCB(index)->GetSize(), sizeof(dataType));
#define CHECK_INVALID_SHADER_PASS_CB_SIZE(shader, index, dataType) if (shader->GetCB(index)->GetSize() != sizeof(dataType) && shader->GetCB(index)->GetSize() != 0) { REPORT_INVALID_SHADER_PASS_CB_SIZE(shader, index, dataType); return true; }
#define CHECK_INVALID_SHADER_PASS_CB_SIZE(shader, index, dataType) ASSERT(shader && shader->GetCB(index)); if (shader->GetCB(index)->GetSize() != sizeof(dataType) && shader->GetCB(index)->GetSize() != 0) { REPORT_INVALID_SHADER_PASS_CB_SIZE(shader, index, dataType); return true; }