diff --git a/src/hwr2/pass_blit_rect.cpp b/src/hwr2/pass_blit_rect.cpp index 2dc54487a..21c7cf343 100644 --- a/src/hwr2/pass_blit_rect.cpp +++ b/src/hwr2/pass_blit_rect.cpp @@ -47,7 +47,7 @@ static const PipelineDesc kPalettedPipelineDescription = { // 256x1 palette texture SamplerName::kSampler1}}, std::nullopt, - {PixelFormat::kRGBA8, std::nullopt, {true, true, true, true}}, + {std::nullopt, {true, true, true, true}}, PrimitiveType::kTriangles, CullMode::kNone, FaceWinding::kCounterClockwise, @@ -61,7 +61,7 @@ static const PipelineDesc kUnshadedPipelineDescription = { {{// RGB/A texture SamplerName::kSampler0}}, std::nullopt, - {PixelFormat::kRGBA8, std::nullopt, {true, true, true, true}}, + {std::nullopt, {true, true, true, true}}, PrimitiveType::kTriangles, CullMode::kNone, FaceWinding::kCounterClockwise, diff --git a/src/hwr2/pass_imgui.cpp b/src/hwr2/pass_imgui.cpp index 47005d2b5..f710b22fc 100644 --- a/src/hwr2/pass_imgui.cpp +++ b/src/hwr2/pass_imgui.cpp @@ -26,8 +26,7 @@ static const PipelineDesc kPipelineDesc = { {{{{UniformName::kProjection}}, {{UniformName::kModelView, UniformName::kTexCoord0Transform}}}}, {{SamplerName::kSampler0}}, PipelineDepthStencilStateDesc {true, true, CompareFunc::kAlways, false, {}, {}}, - {PixelFormat::kRGBA8, - BlendDesc { + {BlendDesc { BlendFactor::kSourceAlpha, BlendFactor::kOneMinusSourceAlpha, BlendFunction::kAdd, diff --git a/src/hwr2/pass_postprocess.cpp b/src/hwr2/pass_postprocess.cpp index 9a6f44f38..f3eb722a9 100644 --- a/src/hwr2/pass_postprocess.cpp +++ b/src/hwr2/pass_postprocess.cpp @@ -50,7 +50,7 @@ static const PipelineDesc kWipePipelineDesc = { {{{{UniformName::kProjection, UniformName::kWipeColorizeMode, UniformName::kWipeEncoreSwizzle}}}}, {{SamplerName::kSampler0, SamplerName::kSampler1, SamplerName::kSampler2}}, std::nullopt, - {PixelFormat::kRGBA8, std::nullopt, {true, true, true, true}}, + {std::nullopt, {true, true, true, true}}, PrimitiveType::kTriangles, CullMode::kNone, FaceWinding::kCounterClockwise, diff --git a/src/hwr2/pass_twodee.cpp b/src/hwr2/pass_twodee.cpp index a3df15f90..955831825 100644 --- a/src/hwr2/pass_twodee.cpp +++ b/src/hwr2/pass_twodee.cpp @@ -345,7 +345,7 @@ static PipelineDesc make_pipeline_desc(TwodeePipelineKey key) {{UniformName::kModelView, UniformName::kTexCoord0Transform, UniformName::kSampler0IsIndexedAlpha}}}}, {{SamplerName::kSampler0, SamplerName::kSampler1, SamplerName::kSampler2}}, std::nullopt, - {PixelFormat::kRGBA8, blend_desc, {true, true, true, true}}, + {blend_desc, {true, true, true, true}}, key.lines ? PrimitiveType::kLines : PrimitiveType::kTriangles, CullMode::kNone, FaceWinding::kCounterClockwise, diff --git a/src/rhi/gl3_core/gl3_core_rhi.cpp b/src/rhi/gl3_core/gl3_core_rhi.cpp index 96253a492..54ce211bf 100644 --- a/src/rhi/gl3_core/gl3_core_rhi.cpp +++ b/src/rhi/gl3_core/gl3_core_rhi.cpp @@ -1260,6 +1260,7 @@ void GlCoreRhi::begin_render_pass(Handle ctx, const RenderPassB SRB2_ASSERT(texture_slab_.is_valid(info.color_attachment)); auto& texture = texture_slab_[info.color_attachment]; + SRB2_ASSERT(texture.desc.format == TextureFormat::kRGBA); gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.texture, 0); GL_ASSERT; diff --git a/src/rhi/rhi.hpp b/src/rhi/rhi.hpp index 0d30488b8..c1d477b00 100644 --- a/src/rhi/rhi.hpp +++ b/src/rhi/rhi.hpp @@ -397,7 +397,6 @@ struct PipelineDepthStencilStateDesc struct PipelineColorStateDesc { - PixelFormat format; std::optional blend; ColorMask color_mask; };