mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-28 02:41:18 +00:00
DX9: Revert a bad optimization, hopefully fixing #10205. Vulkan: Add a missing check.
This commit is contained in:
parent
d032b41d94
commit
d884eeda99
@ -147,9 +147,13 @@ void ShaderManagerDX9::PSSetColorUniform3(int creg, u32 color) {
|
||||
}
|
||||
|
||||
void ShaderManagerDX9::PSSetColorUniform3Alpha255(int creg, u32 color, u8 alpha) {
|
||||
float f[4];
|
||||
Uint8x3ToFloat4_AlphaUint8(f, color, alpha);
|
||||
device_->SetPixelShaderConstantF(creg, f, 1);
|
||||
const float col[4] = {
|
||||
(float)((color & 0xFF)),
|
||||
(float)((color & 0xFF00) >> 8),
|
||||
(float)((color & 0xFF0000) >> 16),
|
||||
(float)alpha,
|
||||
};
|
||||
device_->SetPixelShaderConstantF(creg, col, 1);
|
||||
}
|
||||
|
||||
void ShaderManagerDX9::PSSetFloat(int creg, float value) {
|
||||
|
@ -69,7 +69,8 @@ DepalShaderCacheVulkan::~DepalShaderCacheVulkan() {
|
||||
|
||||
void DepalShaderCacheVulkan::DeviceLost() {
|
||||
Clear();
|
||||
vulkan_->Delete().QueueDeleteShaderModule(vshader_);
|
||||
if (vshader_)
|
||||
vulkan_->Delete().QueueDeleteShaderModule(vshader_);
|
||||
draw_ = nullptr;
|
||||
vulkan_ = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user