Skip to content
  • Gert Wollny's avatar
    mesa/st: don't prematurely optimize for render targets when on virgl · b9e9ed67
    Gert Wollny authored
    For three component textures virgl faces the problem that the host driver
    may report that these can not be used as a render target, and when the
    client requests such a texture a four-componet texture will be choosen
    even if only a sampler view was requested. One example where this happens
    is with the Intel i965 driver that doesn't support RGB32* as render target.
    The result is that when allocating a GL_RGB32F and a GL_RGB32I texture, and
    then glCopyImageSubData is called for these two texture, gallium will fail
    with an assertion, because it reports a different per pixel bit count.
    
    Therefore, when using the virgl driver, don't try to enable BIND_RENDER_TARGET
    for RGB textures that were requested with only BIND_SAMPLER_VIEW.
    b9e9ed67