[Vulkan] Fix FragStencilRef store type
This commit is contained in:
parent
f357f26eae
commit
c238d8af55
|
@ -3174,7 +3174,9 @@ VkShaderModule VulkanRenderTargetCache::GetTransferShader(
|
||||||
source_stencil[0] != spv::NoResult) {
|
source_stencil[0] != spv::NoResult) {
|
||||||
// For the depth -> depth case, write the stencil directly to the output.
|
// For the depth -> depth case, write the stencil directly to the output.
|
||||||
assert_true(mode.output == TransferOutput::kDepth);
|
assert_true(mode.output == TransferOutput::kDepth);
|
||||||
builder.createStore(source_stencil[0], output_fragment_stencil_ref);
|
builder.createStore(builder.createUnaryOp(spv::OpBitcast, type_int,
|
||||||
|
source_stencil[0]),
|
||||||
|
output_fragment_stencil_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dest_is_64bpp) {
|
if (dest_is_64bpp) {
|
||||||
|
@ -3518,13 +3520,15 @@ VkShaderModule VulkanRenderTargetCache::GetTransferShader(
|
||||||
if (output_fragment_stencil_ref != spv::NoResult) {
|
if (output_fragment_stencil_ref != spv::NoResult) {
|
||||||
builder.createStore(
|
builder.createStore(
|
||||||
builder.createUnaryOp(
|
builder.createUnaryOp(
|
||||||
spv::OpConvertFToU, type_uint,
|
spv::OpBitcast, type_int,
|
||||||
builder.createBinOp(
|
builder.createUnaryOp(
|
||||||
spv::OpFAdd, type_float,
|
spv::OpConvertFToU, type_uint,
|
||||||
builder.createBinOp(spv::OpFMul, type_float,
|
builder.createBinOp(
|
||||||
source_color[0][0],
|
spv::OpFAdd, type_float,
|
||||||
unorm_scale),
|
builder.createBinOp(spv::OpFMul, type_float,
|
||||||
unorm_round_offset)),
|
source_color[0][0],
|
||||||
|
unorm_scale),
|
||||||
|
unorm_round_offset))),
|
||||||
output_fragment_stencil_ref);
|
output_fragment_stencil_ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue