[Code] Remove game names from code comments (most of at least)
This commit is contained in:
@@ -1662,7 +1662,7 @@ void D3D12CommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
|
||||
gamma_ramp_upload_mapping_ + gamma_ramp_footprint.Offset);
|
||||
for (uint32_t i = 0; i < 256; ++i) {
|
||||
uint32_t value = gamma_ramp_.normal[i].value;
|
||||
// Swap red and blue (Project Sylpheed has settings allowing separate
|
||||
// Swap red and blue (535107D4 has settings allowing separate
|
||||
// configuration).
|
||||
mapping[i] = ((value & 1023) << 20) | (value & (1023 << 10)) |
|
||||
((value >> 20) & 1023);
|
||||
@@ -2076,7 +2076,7 @@ bool D3D12CommandProcessor::IssueDraw(xenos::PrimitiveType primitive_type,
|
||||
memexport_stream.index_count * memexport_format_size;
|
||||
// Try to reduce the number of shared memory operations when writing
|
||||
// different elements into the same buffer through different exports
|
||||
// (happens in Halo 3).
|
||||
// (happens in 4D5307E6).
|
||||
bool memexport_range_reused = false;
|
||||
for (uint32_t i = 0; i < memexport_range_count; ++i) {
|
||||
MemExportRange& memexport_range = memexport_ranges[i];
|
||||
@@ -2878,8 +2878,9 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
||||
// Get the color info register values for each render target. Also, for ROV,
|
||||
// exclude components that don't exist in the format from the write mask.
|
||||
// Don't exclude fully overlapping render targets, however - two render
|
||||
// targets with the same base address are used in the lighting pass of Halo 3,
|
||||
// for example, with the needed one picked with dynamic control flow.
|
||||
// targets with the same base address are used in the lighting pass of
|
||||
// 4D5307E6, for example, with the needed one picked with dynamic control
|
||||
// flow.
|
||||
reg::RB_COLOR_INFO color_infos[4];
|
||||
float rt_clamp[4][4];
|
||||
uint32_t rt_keep_masks[4][2];
|
||||
@@ -2898,8 +2899,8 @@ void D3D12CommandProcessor::UpdateSystemConstantValues(
|
||||
}
|
||||
|
||||
// Disable depth and stencil if it aliases a color render target (for
|
||||
// instance, during the XBLA logo in Banjo-Kazooie, though depth writing is
|
||||
// already disabled there).
|
||||
// instance, during the XBLA logo in 58410954, though depth writing is already
|
||||
// disabled there).
|
||||
bool depth_stencil_enabled =
|
||||
rb_depthcontrol.stencil_enable || rb_depthcontrol.z_enable;
|
||||
if (edram_rov_used && depth_stencil_enabled) {
|
||||
|
||||
@@ -83,9 +83,9 @@ class D3D12CommandProcessor : public CommandProcessor {
|
||||
|
||||
// Gets the current color write mask, taking the pixel shader's write mask
|
||||
// into account. If a shader doesn't write to a render target, it shouldn't be
|
||||
// written to and it shouldn't be even bound - otherwise, in Halo 3, one
|
||||
// written to and it shouldn't be even bound - otherwise, in 4D5307E6, one
|
||||
// render target is being destroyed by a shader not writing anything, and in
|
||||
// Banjo-Tooie, the result of clearing the top tile is being ignored because
|
||||
// 58410955, the result of clearing the top tile is being ignored because
|
||||
// there are 4 render targets bound with the same EDRAM base (clearly not
|
||||
// correct usage), but the shader only clears 1, and then EDRAM buffer stores
|
||||
// conflict with each other.
|
||||
|
||||
@@ -3619,7 +3619,7 @@ D3D12RenderTargetCache::GetOrCreateTransferPipelines(TransferShaderKey key) {
|
||||
case xenos::DepthRenderTargetFormat::kD24S8:
|
||||
// Round to the nearest even integer. This seems to be the correct,
|
||||
// adding +0.5 and rounding towards zero results in red instead of
|
||||
// black in GTA IV and Halo 3 clear shaders.
|
||||
// black in the 4D5307E6 clear shader.
|
||||
a.OpMul(dxbc::Dest::R(i, 0b1000), dxbc::Src::R(i, dxbc::Src::kWWWW),
|
||||
dxbc::Src::LF(float(0xFFFFFF)));
|
||||
a.OpRoundNE(dxbc::Dest::R(i, 0b1000),
|
||||
@@ -3804,7 +3804,7 @@ D3D12RenderTargetCache::GetOrCreateTransferPipelines(TransferShaderKey key) {
|
||||
case xenos::DepthRenderTargetFormat::kD24S8:
|
||||
// Round to the nearest even integer. This seems to be the correct,
|
||||
// adding +0.5 and rounding towards zero results in red instead of
|
||||
// black in GTA IV and Halo 3 clear shaders.
|
||||
// black in the 4D5307E6 clear shader.
|
||||
a.OpMul(dxbc::Dest::R(1, 0b1000), dxbc::Src::R(1, dxbc::Src::kWWWW),
|
||||
dxbc::Src::LF(float(0xFFFFFF)));
|
||||
a.OpRoundNE(dxbc::Dest::R(1, 0b1000),
|
||||
@@ -4181,7 +4181,7 @@ D3D12RenderTargetCache::GetOrCreateTransferPipelines(TransferShaderKey key) {
|
||||
case xenos::DepthRenderTargetFormat::kD24S8:
|
||||
// Round to the nearest even integer. This seems to be the
|
||||
// correct, adding +0.5 and rounding towards zero results in red
|
||||
// instead of black in GTA IV and Halo 3 clear shaders.
|
||||
// instead of black in the 4D5307E6 clear shader.
|
||||
a.OpMul(dxbc::Dest::R(0, 0b0010),
|
||||
dxbc::Src::R(0, dxbc::Src::kXXXX),
|
||||
dxbc::Src::LF(float(0xFFFFFF)));
|
||||
@@ -6228,7 +6228,7 @@ ID3D12PipelineState* D3D12RenderTargetCache::GetOrCreateDumpPipeline(
|
||||
case xenos::DepthRenderTargetFormat::kD24S8:
|
||||
// Round to the nearest even integer. This seems to be the correct,
|
||||
// adding +0.5 and rounding towards zero results in red instead of
|
||||
// black in GTA IV and Halo 3 clear shaders.
|
||||
// black in the 4D5307E6 clear shader.
|
||||
a.OpMul(dxbc::Dest::R(1, 0b0001), dxbc::Src::R(1, dxbc::Src::kXXXX),
|
||||
dxbc::Src::LF(float(0xFFFFFF)));
|
||||
a.OpRoundNE(dxbc::Dest::R(1, 0b0001),
|
||||
|
||||
@@ -1567,7 +1567,8 @@ bool PipelineCache::GetCurrentStateDescription(
|
||||
/* 16 */ PipelineBlendFactor::kSrcAlphaSat,
|
||||
};
|
||||
// Like kBlendFactorMap, but with color modes changed to alpha. Some
|
||||
// pipelines aren't created in Prey because a color mode is used for alpha.
|
||||
// pipelines aren't created in 545407E0 because a color mode is used for
|
||||
// alpha.
|
||||
static const PipelineBlendFactor kBlendFactorAlphaMap[32] = {
|
||||
/* 0 */ PipelineBlendFactor::kZero,
|
||||
/* 1 */ PipelineBlendFactor::kOne,
|
||||
@@ -1599,7 +1600,7 @@ bool PipelineCache::GetCurrentStateDescription(
|
||||
// have their sample count matching the one set in the pipeline - however if
|
||||
// we set NumRenderTargets to 0 and also disable depth / stencil, the sample
|
||||
// count must be set to 1 - while the command list may still have
|
||||
// multisampled render targets bound (happens in Halo 3 main menu).
|
||||
// multisampled render targets bound (happens in 4D5307E6 main menu).
|
||||
// TODO(Triang3l): Investigate interaction of OMSetRenderTargets with
|
||||
// non-null depth and DSVFormat DXGI_FORMAT_UNKNOWN in the same case.
|
||||
for (uint32_t i = 0; i < 4; ++i) {
|
||||
@@ -2005,7 +2006,7 @@ ID3D12PipelineState* PipelineCache::CreateD3D12Pipeline(
|
||||
state_desc.BlendState.RenderTarget[i];
|
||||
// Treat 1 * src + 0 * dest as disabled blending (there are opaque
|
||||
// surfaces drawn with blending enabled, but it's 1 * src + 0 * dest, in
|
||||
// Call of Duty 4 - GPU performance is better when not blending.
|
||||
// 415607E6 - GPU performance is better when not blending.
|
||||
if (rt.src_blend != PipelineBlendFactor::kOne ||
|
||||
rt.dest_blend != PipelineBlendFactor::kZero ||
|
||||
rt.blend_op != xenos::BlendOp::kAdd ||
|
||||
|
||||
@@ -121,8 +121,8 @@ namespace shaders {
|
||||
// components of operands in shaders.
|
||||
// For DXT3A and DXT5A, RRRR swizzle is specified in:
|
||||
// http://fileadmin.cs.lth.se/cs/Personal/Michael_Doggett/talks/unc-xenos-doggett.pdf
|
||||
// Halo 3 also expects replicated components in k_8 sprites.
|
||||
// DXN is read as RG in Halo 3, but as RA in Call of Duty.
|
||||
// 4D5307E6 also expects replicated components in k_8 sprites.
|
||||
// DXN is read as RG in 4D5307E6, but as RA in 415607E6.
|
||||
// TODO(Triang3l): Find out the correct contents of unused texture components.
|
||||
const TextureCache::HostFormat TextureCache::host_formats_[64] = {
|
||||
// k_1_REVERSE
|
||||
@@ -250,9 +250,9 @@ const TextureCache::HostFormat TextureCache::host_formats_[64] = {
|
||||
LoadMode::kUnknown,
|
||||
{2, 1, 0, 3}},
|
||||
// k_Y1_Cr_Y0_Cb_REP
|
||||
// Used for videos in NBA 2K9. Red and blue must be swapped.
|
||||
// Used for videos in 54540829. Red and blue must be swapped.
|
||||
// TODO(Triang3l): D3DFMT_G8R8_G8B8 is DXGI_FORMAT_R8G8_B8G8_UNORM * 255.0f,
|
||||
// watch out for num_format int, division in shaders, etc., in NBA 2K9 it
|
||||
// watch out for num_format int, division in shaders, etc., in 54540829 it
|
||||
// works as is. Also need to decompress if the size is uneven, but should be
|
||||
// a very rare case.
|
||||
{DXGI_FORMAT_R8G8_B8G8_UNORM,
|
||||
@@ -1309,7 +1309,7 @@ void TextureCache::RequestTextures(uint32_t used_texture_mask) {
|
||||
// Clear the bindings not only for this draw call, but entirely, because
|
||||
// loading may be needed in some draw call later, which may have the same
|
||||
// key for some binding as before the invalidation, but texture_invalidated_
|
||||
// being false (menu background in Halo 3).
|
||||
// being false (menu background in 4D5307E6).
|
||||
for (size_t i = 0; i < xe::countof(texture_bindings_); ++i) {
|
||||
texture_bindings_[i].Clear();
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ class TextureCache {
|
||||
// Uncompression info for when the regular host format for this texture is
|
||||
// block-compressed, but the size is not block-aligned, and thus such
|
||||
// texture cannot be created in Direct3D on PC and needs decompression,
|
||||
// however, such textures are common, for instance, in Halo 3. This only
|
||||
// however, such textures are common, for instance, in 4D5307E6. This only
|
||||
// supports unsigned normalized formats - let's hope GPUSIGN_SIGNED was not
|
||||
// used for DXN and DXT5A.
|
||||
DXGI_FORMAT dxgi_format_uncompressed;
|
||||
|
||||
Reference in New Issue
Block a user