[Mesa-dev] [PATCH 1/7] gallium: Add PIPE_CAP_FRAMEBUFFER_LAYERS
Ilia Mirkin
imirkin at alum.mit.edu
Sun Jan 31 06:11:37 PST 2016
This seems odd. When would this not just be MaxArrayTextureLayers? IMO
a plain enable cap, like PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENTS makes
more sense here.
On Sun, Jan 31, 2016 at 1:25 AM, Edward O'Callaghan
<eocallaghan at alterapraxis.com> wrote:
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index d066784..99105bd 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -490,6 +490,7 @@ void st_init_extensions(struct pipe_screen *screen,
> { o(ARB_fragment_program_shadow), PIPE_CAP_TEXTURE_SHADOW_MAP },
> { o(ARB_framebuffer_object), PIPE_CAP_MIXED_FRAMEBUFFER_SIZES },
> { o(ARB_indirect_parameters), PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS },
> + { o(ARB_framebuffer_no_attachments), PIPE_CAP_MAX_FRAMEBUFFER_LAYERS },
> { o(ARB_instanced_arrays), PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR },
> { o(ARB_occlusion_query), PIPE_CAP_OCCLUSION_QUERY },
> { o(ARB_occlusion_query2), PIPE_CAP_OCCLUSION_QUERY },
> @@ -962,6 +963,18 @@ void st_init_extensions(struct pipe_screen *screen,
> extensions->AMD_vertex_shader_viewport_index = GL_TRUE;
> }
>
> + /* ARB_framebuffer_no_attachments */
> + consts->MaxFramebufferWidth = consts->MaxViewportWidth;
> + consts->MaxFramebufferHeight = consts->MaxViewportHeight;
> + consts->MaxFramebufferSamples = consts->MaxSamples;
> + consts->MaxFramebufferLayers
> + = screen->get_param(screen, PIPE_CAP_MAX_FRAMEBUFFER_LAYERS);
> + if ((consts->MaxSamples >= 4 && consts->MaxFramebufferLayers >= 2048)
> + || (consts->MaxFramebufferSamples >= consts->MaxSamples &&
> + consts->MaxFramebufferLayers >= consts->MaxArrayTextureLayers))
> + extensions->ARB_framebuffer_no_attachments = GL_TRUE;
You don't want both of these... either you want to just enable the ext
when the cap is on, or you want to enable the ext under certain more
complex conditions.
-ilia
More information about the mesa-dev
mailing list