Fastest way to detect renderer's preferred RGB pixelformat

as you know, QueryTexture returns the pixelformat that surface’s being copied to the texture should be.
Unfortunately it doesn’t give a clue as to what the pixelformat of the texture itself is.

Up until now I’ve been creating an RGBA surface (little/big-endian accounted for), then using CreateTextureFromSurface to create my surfaces - which is fine but very slow for large empty textures. It is currently the only way I know of to get the renderer to use it’s most-preferred RGBA format for the texture.

If QueryTexture returned the pixelformat of the texture itself as well as the desired transfer surface pixelformat, I could grab the pixelformat from that and use it for all subsequent textures.

Does anybody know of a moethod to determine the renderer’s default preferred 32-bit pixelformat?

Nevermind, did what I shoulda done in the first place and checked the CreateTextureFromSurface sourcecode:
" /* See what the best texture format is */
fmt = surface->format;
if (fmt->Amask || SDL_GetColorKey(surface, NULL) == 0) {
needAlpha = SDL_TRUE;
} else {
needAlpha = SDL_FALSE;
format = renderer->info.texture_formats[0];
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
format = renderer->info.texture_formats[i];

texture = SDL_CreateTexture(renderer, format, SDL_TEXTUREACCESS_STATIC,
                            surface->w, surface->h);
if (!texture) {
    return NULL;