mirror of https://github.com/encounter/aurora.git
Fix GXSetTevColorS10; fix sampling GX_TF_R8_PC
This commit is contained in:
parent
e22541f175
commit
04590f30cd
|
@ -61,10 +61,10 @@ void GXSetTevColor(GXTevRegID id, GXColor color) {
|
||||||
|
|
||||||
void GXSetTevColorS10(GXTevRegID id, GXColorS10 color) {
|
void GXSetTevColorS10(GXTevRegID id, GXColorS10 color) {
|
||||||
update_gx_state(g_gxState.colorRegs[id], aurora::Vec4<float>{
|
update_gx_state(g_gxState.colorRegs[id], aurora::Vec4<float>{
|
||||||
static_cast<float>(color.r) / 1023.f,
|
static_cast<float>(color.r) / 255.f,
|
||||||
static_cast<float>(color.g) / 1023.f,
|
static_cast<float>(color.g) / 255.f,
|
||||||
static_cast<float>(color.b) / 1023.f,
|
static_cast<float>(color.b) / 255.f,
|
||||||
static_cast<float>(color.a) / 1023.f,
|
static_cast<float>(color.a) / 255.f,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,7 @@ static inline bool requires_load_conversion(const GXTexObj_& obj) {
|
||||||
case GX_TF_C4:
|
case GX_TF_C4:
|
||||||
case GX_TF_C8:
|
case GX_TF_C8:
|
||||||
case GX_TF_C14X2:
|
case GX_TF_C14X2:
|
||||||
|
case GX_TF_R8_PC:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -574,6 +574,7 @@ static inline std::string texture_conversion(const TextureConfig& tex, u32 stage
|
||||||
break;
|
break;
|
||||||
case GX_TF_I4:
|
case GX_TF_I4:
|
||||||
case GX_TF_I8:
|
case GX_TF_I8:
|
||||||
|
case GX_TF_R8_PC:
|
||||||
// Splat R to RGBA
|
// Splat R to RGBA
|
||||||
out += fmt::format(FMT_STRING("\n sampled{0} = vec4<f32>(sampled{0}.r);"), stageIdx);
|
out += fmt::format(FMT_STRING("\n sampled{0} = vec4<f32>(sampled{0}.r);"), stageIdx);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct TextureRef {
|
||||||
|
|
||||||
~TextureRef() {
|
~TextureRef() {
|
||||||
wgpuTextureViewRelease(view);
|
wgpuTextureViewRelease(view);
|
||||||
wgpuTextureDestroy(texture);
|
wgpuTextureRelease(texture);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue