[D3D12] Pipeline debug name, DXBC norm16 vertex fix
This commit is contained in:
parent
c9ffe98d21
commit
5f0df6d1fa
|
@ -19,6 +19,7 @@
|
|||
#include "xenia/base/assert.h"
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/profiling.h"
|
||||
#include "xenia/base/string.h"
|
||||
#include "xenia/gpu/d3d12/d3d12_command_processor.h"
|
||||
#include "xenia/gpu/gpu_flags.h"
|
||||
|
||||
|
@ -692,7 +693,19 @@ PipelineCache::Pipeline* PipelineCache::GetPipeline(uint64_t hash_key) {
|
|||
XELOGE("Failed to create graphics pipeline state");
|
||||
return nullptr;
|
||||
}
|
||||
// TODO(Triang3l): Set the name for the pipeline, with shader hashes.
|
||||
|
||||
std::wstring name;
|
||||
if (update_shader_stages_regs_.pixel_shader != nullptr) {
|
||||
name = xe::format_string(
|
||||
L"VS %.16I64X, PS %.16I64X, PL %.16I64X",
|
||||
update_shader_stages_regs_.vertex_shader->ucode_data_hash(),
|
||||
update_shader_stages_regs_.pixel_shader->ucode_data_hash(), hash_key);
|
||||
} else {
|
||||
name = xe::format_string(
|
||||
L"VS %.16I64X, PL %.16I64X",
|
||||
update_shader_stages_regs_.vertex_shader->ucode_data_hash(), hash_key);
|
||||
}
|
||||
state->SetName(name.c_str());
|
||||
|
||||
// Add to cache with the hash key for reuse.
|
||||
Pipeline* pipeline = new Pipeline;
|
||||
|
|
|
@ -3017,8 +3017,9 @@ void DxbcShaderTranslator::ProcessVertexFetchInstruction(
|
|||
extract_widths[3] = 16;
|
||||
extract_offsets[1] = extract_offsets[3] = 16;
|
||||
extract_swizzle = 0b01010000;
|
||||
normalize_scales[0] = normalize_scales[1] =
|
||||
instr.attributes.is_signed ? (1.0f / 32767.0f) : (1.0f / 65535.0f);
|
||||
normalize_scales[0] = normalize_scales[1] = normalize_scales[2] =
|
||||
normalize_scales[3] = instr.attributes.is_signed ? (1.0f / 32767.0f)
|
||||
: (1.0f / 65535.0f);
|
||||
break;
|
||||
case VertexFormat::k_16_16_FLOAT:
|
||||
extract_signed = false;
|
||||
|
@ -3041,6 +3042,9 @@ void DxbcShaderTranslator::ProcessVertexFetchInstruction(
|
|||
instr.attributes.is_signed ? (1.0f / 2147483647.0f)
|
||||
: (1.0f / 4294967295.0f);
|
||||
break;
|
||||
default:
|
||||
// 32-bit float.
|
||||
break;
|
||||
}
|
||||
|
||||
// Extract components from packed data if needed.
|
||||
|
|
Loading…
Reference in New Issue