mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
gpu: do not crash on null pixel shader
This commit is contained in:
parent
43afb19855
commit
9f230af943
|
|
@ -467,18 +467,18 @@ void amdgpu::draw(GraphicsPipe &pipe, int vmId, std::uint32_t firstVertex,
|
|||
vsPrimType, viewPorts);
|
||||
}
|
||||
|
||||
auto pixelShader =
|
||||
cacheTag.getPixelShader(pipe.sh.spiShaderPgmPs, pipe.context, viewPorts);
|
||||
|
||||
if (pixelShader.handle == nullptr) {
|
||||
shaders[Cache::getStageIndex(VK_SHADER_STAGE_FRAGMENT_BIT)] =
|
||||
getFillRedFragShader(*cacheTag.getCache());
|
||||
}
|
||||
|
||||
shaders[Cache::getStageIndex(VK_SHADER_STAGE_VERTEX_BIT)] =
|
||||
vertexShader.handle;
|
||||
shaders[Cache::getStageIndex(VK_SHADER_STAGE_FRAGMENT_BIT)] =
|
||||
pixelShader.handle;
|
||||
|
||||
if (pipe.sh.spiShaderPgmPs.address != 0) {
|
||||
auto pixelShader = cacheTag.getPixelShader(pipe.sh.spiShaderPgmPs,
|
||||
pipe.context, viewPorts);
|
||||
|
||||
shaders[Cache::getStageIndex(VK_SHADER_STAGE_FRAGMENT_BIT)] =
|
||||
pixelShader.handle != nullptr
|
||||
? pixelShader.handle
|
||||
: getFillRedFragShader(*cacheTag.getCache());
|
||||
}
|
||||
|
||||
if (pipe.uConfig.vgtPrimitiveType == gnm::PrimitiveType::RectList) {
|
||||
shaders[Cache::getStageIndex(VK_SHADER_STAGE_GEOMETRY_BIT)] =
|
||||
|
|
|
|||
Loading…
Reference in a new issue