port: Grp texture/image/buffer units toward 40250 (+ port.grp_resource)
GrpImage/GrpSubImage verbatim; GrpImageTexture DDS path through CDXTCImage header + low-texture-memory mip bias, CreateDeviceObjects/CreateFromDiskFile verbatim; GrpTexture::SetTextureStage via STATEMANAGER. Port-map entries for GrpTexture/Image/SubImage/ImageTexture/IndexBuffer/VertexBuffer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7e385f827b
commit
010e99f070
@@ -5,56 +5,127 @@
|
||||
"contracts": [],
|
||||
"functions": {
|
||||
"CGraphicImageTexture::Lock": {
|
||||
"status": "TODO"
|
||||
"status": "ADAPTED",
|
||||
"note": "40250: LockRect on the D3D texture. Port: the memory texture's native bytes in its own format, pitch = width*bpp. Invariant: the font pages write the same A4R4G4B4 words.",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Lock"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::Unlock": {
|
||||
"status": "TODO"
|
||||
"status": "ADAPTED",
|
||||
"note": "40250: UnlockRect. Port: converts the native pixels to ARGB32 and bumps the revision in the handle name. Invariant: the canvas sees the written pixels after Unlock.",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Unlock"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::Initialize": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Initialize"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::Destroy": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Destroy"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::CreateDeviceObjects": {
|
||||
"status": "TODO"
|
||||
"status": "ADAPTED",
|
||||
"note": "40250: CreateTexture (font) / pack Get + CreateFromMemoryFile. Port: the empty-name branch makes a memory texture; the file branch is verbatim. Invariant: same success/failure and size.",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateDeviceObjects"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::Create": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Create"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::CreateFromTexturePointer": {
|
||||
"status": "TODO"
|
||||
"status": "ADAPTED",
|
||||
"note": "40250: shares the source D3D texture with AddRef. Port: handles are not reference counted, so the copy gets its own handle naming the source's pack path. Invariant: the sub image draws the source file with the source size.",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromTexturePointer"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::CreateDDSTexture": {
|
||||
"status": "ADAPTED",
|
||||
"impl": [
|
||||
"src/host/dxt.cpp:decode",
|
||||
"src/host/vk_textures.cpp:get_gpu_texture",
|
||||
"src/host/vk_textures.cpp:upload_texture"
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateDDSTexture"
|
||||
],
|
||||
"test": "tests/port/dxt_decode_test.cpp",
|
||||
"note": "The platform CreateDDSTexture member is a stub; its level logic lives in the texture decode/upload the renderer does. mipmapCount = max(1, min(dwMipMapCount, MAX_MIPLEVELS=12)), level i read at sum(dwLinearSize>>2k) with CDXTCImage::Copy's dwLinearSize>>2i bytes (the rest zero, uninitialised in 40250), decoded to RGBA8 (no GPU DXT) and uploaded as file levels, not regenerated. Divergence: without DDSD_MIPMAPCOUNT, or with DDSD_PITCH, 40250 creates the extra levels uninitialised; here that is one level. IsLowTextureMemory's uTexBias level skip is not applied (the port's ms_isLowTextureMemory is false). The far-terrain look NEEDS_LIVE."
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
],
|
||||
"note": "40250: D3DXCreateTexture + per-level LockRect/Copy (and an A4R4G4B4/A1R5G5B5 copy without DXT support). Port: a file handle; the renderers decode the .dds. Invariant: the size, including the low-texture-memory top-mip skip, is 40250's."
|
||||
},
|
||||
"CGraphicImageTexture::CreateFromMemoryFile": {
|
||||
"status": "ADAPTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromMemoryFile",
|
||||
"src/host/vk_textures.cpp:get_gpu_texture"
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromMemoryFile"
|
||||
],
|
||||
"test": "tests/port/dxt_decode_test.cpp",
|
||||
"note": "The platform body records only the size and file name; the renderer decodes the bytes. 40250 dispatch is kept: a DXT DDS takes the CreateDDSTexture levels, anything else takes D3DXCreateTextureFromFileInMemoryEx(MipLevels=D3DX_DEFAULT), i.e. a full generated chain (vkCmdBlitImage linear, instead of D3DX's box filter). The invented is_ui_tex rule (no mips for icon/, ui/, locale/ and textures <=128px) was removed. Memory textures (mem:, 40250 CreateTexture levels=1) get one level. GRAPHICS_CAPS_HALF_SIZE_IMAGE/low-memory A4R4G4B4 re-encode is not applied."
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
],
|
||||
"note": "40250: LoadHeaderFromMemory → CreateDDSTexture, else D3DXCreateTextureFromFileInMemoryEx. Port: same DDS check (only when the buffer holds 128 bytes), else the size is read from the DDS/PNG/JPEG/BMP/TGA header and the canvas decodes. Invariant: same width/height and failure on undecodable bytes."
|
||||
},
|
||||
"CGraphicImageTexture::SetFileName": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::SetFileName"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::CreateFromDiskFile": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromDiskFile"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::CGraphicImageTexture": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CGraphicImageTexture"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
},
|
||||
"CGraphicImageTexture::~CGraphicImageTexture": {
|
||||
"status": "TODO"
|
||||
"status": "PORTED",
|
||||
"impl": [
|
||||
"src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::~CGraphicImageTexture"
|
||||
],
|
||||
"test": [
|
||||
"tests/port/port_grp_resource_test.cpp"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user