Need help on blend modes (bug in SW renderer?)

Hi there!
I’m developing a render backend for the Nintendo Wii, and I’m struggling to understand how blend modes work. I’m especially confused by how the software renderer behaves, because I’m under the impression that it doesn’t do everything correctly.

I’ve modified the testgeometry test by removing the call to SDL_SetRenderDrawBlendMode() and just keep the blend modes on the texture (SDL_SetTextureBlendMode()). The results are the following – accompanied by my comments:

  1. SDL_BLENDMODE_NONE: I would expect this to just be the texture, but it’s blended with the vertex colours. Is this correct?
    image

  2. SDL_BLENDMODE_BLEND: darker than expected.
    image

  3. SDL_BLENDMODE_MOD: darker than expected:
    image

If I set the background to all white, then at least the BLEND and MOD modes get rendered correctly, and not as dark as in these screenshots. So, it looks like the textures are blended both with the vertex colours, and with the background colour, despite having removed the call to SDL_SetRenderDrawBlendMode(). Is this a bug in the software renderer? Or can someone explain me the blend modes, and in particular how to make it so that they only affect the texture ↔ vertex colours elements, and not the existing framebuffer contents?

For the record, I haven’t figured out why the texture in the first image got rendered in that way, but it certainly was a but in renderer’s implementation. As for the images looking dark, indeed that’s the way things are supposed to work with blend modes, as they always affect the blending between the geometry object and the pre-existing background.