From e6a0f70997875f6e3088268a32796be57fdf879c Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 25 Jul 2019 13:11:00 +0100 Subject: [PATCH] Don't flush indices for resources/samplers --- renderdoc/driver/shaders/dxbc/dxbc_debug.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp b/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp index 7d2f7b9b0..0b9d6c9a8 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_debug.cpp @@ -1178,6 +1178,9 @@ ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op) con } } + // is this type a flushable input (for float operations) + bool flushable = true; + switch(oper.type) { case TYPE_TEMP: @@ -1247,6 +1250,7 @@ ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op) con // should be handled specially by instructions that expect these types of // argument but let's be sane and include the index v = s = ShaderVariable("", indices[0], indices[0], indices[0], indices[0]); + flushable = false; break; } case TYPE_IMMEDIATE32: @@ -1452,7 +1456,7 @@ ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op) con v = neg(v, OperationType(op.operation)); } - if(OperationFlushing(op.operation)) + if(OperationFlushing(op.operation) && flushable) { for(int i = 0; i < 4; i++) v.value.fv[i] = flush_denorm(v.value.fv[i]);