@ -101,6 +101,7 @@ enum features_id
feat_debug_cb ,
feat_debug_cb ,
feat_draw_instance ,
feat_draw_instance ,
feat_dual_src_blend ,
feat_dual_src_blend ,
feat_fb_no_attach ,
feat_geometry_shader ,
feat_geometry_shader ,
feat_gl_conditional_render ,
feat_gl_conditional_render ,
feat_gl_prim_restart ,
feat_gl_prim_restart ,
@ -158,6 +159,7 @@ static const struct {
[ feat_debug_cb ] = { UNAVAIL , UNAVAIL , { } } , /* special case */
[ feat_debug_cb ] = { UNAVAIL , UNAVAIL , { } } , /* special case */
[ feat_draw_instance ] = { 31 , 30 , { " GL_ARB_draw_instanced " } } ,
[ feat_draw_instance ] = { 31 , 30 , { " GL_ARB_draw_instanced " } } ,
[ feat_dual_src_blend ] = { 33 , UNAVAIL , { " GL_ARB_blend_func_extended " } } ,
[ feat_dual_src_blend ] = { 33 , UNAVAIL , { " GL_ARB_blend_func_extended " } } ,
[ feat_fb_no_attach ] = { 43 , 31 , { " GL_ARB_framebuffer_no_attachments " } } ,
[ feat_geometry_shader ] = { 32 , UNAVAIL , { } } ,
[ feat_geometry_shader ] = { 32 , UNAVAIL , { } } ,
[ feat_gl_conditional_render ] = { 30 , UNAVAIL , { } } ,
[ feat_gl_conditional_render ] = { 30 , UNAVAIL , { } } ,
[ feat_gl_prim_restart ] = { 31 , UNAVAIL , { } } ,
[ feat_gl_prim_restart ] = { 31 , UNAVAIL , { } } ,
@ -2091,6 +2093,22 @@ void vrend_set_framebuffer_state(struct vrend_context *ctx,
ctx - > sub - > shader_dirty = true ;
ctx - > sub - > shader_dirty = true ;
}
}
void vrend_set_framebuffer_state_no_attach ( struct vrend_context * ctx ,
uint32_t width , uint32_t height ,
uint32_t layers , uint32_t samples )
{
if ( has_feature ( feat_fb_no_attach ) ) {
glFramebufferParameteri ( GL_FRAMEBUFFER ,
GL_FRAMEBUFFER_DEFAULT_WIDTH , width ) ;
glFramebufferParameteri ( GL_FRAMEBUFFER ,
GL_FRAMEBUFFER_DEFAULT_HEIGHT , height ) ;
glFramebufferParameteri ( GL_FRAMEBUFFER ,
GL_FRAMEBUFFER_DEFAULT_LAYERS , layers ) ;
glFramebufferParameteri ( GL_FRAMEBUFFER ,
GL_FRAMEBUFFER_DEFAULT_SAMPLES , samples ) ;
}
}
/*
/*
* if the viewport Y scale factor is > 0 then we are rendering to
* if the viewport Y scale factor is > 0 then we are rendering to
* an FBO already so don ' t need to invert rendering ?
* an FBO already so don ' t need to invert rendering ?
@ -8187,6 +8205,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
caps - > v2 . capability_bits | = VIRGL_CAP_COMPUTE_SHADER ;
caps - > v2 . capability_bits | = VIRGL_CAP_COMPUTE_SHADER ;
}
}
if ( has_feature ( feat_fb_no_attach ) )
caps - > v2 . capability_bits | = VIRGL_CAP_FB_NO_ATTACH ;
if ( has_feature ( feat_texture_view ) )
if ( has_feature ( feat_texture_view ) )
caps - > v2 . capability_bits | = VIRGL_CAP_TEXTURE_VIEW ;
caps - > v2 . capability_bits | = VIRGL_CAP_TEXTURE_VIEW ;