Re: [Mesa-dev] [PATCH 2/4] gallium: add PIPE_BIND_COMMAND_BUFFER
On 04.04.2013 21:53, Christoph Bumiller wrote: On 04.04.2013 21:44, Jose Fonseca wrote: I think that PIPE_BIND_INDIRECT_BUFFER would be more self-descriptive. Marek suggested PIPE_BIND_DRAW_INDIRECT_BUFFER, but I think that's too specific because there's also a DISPATCH_INDIRECT buffer for compute shaders. And just INDIRECT_BUFFER without the _DRAW_ doesn't seem so self-descriptive if you're not thinking in the right context. I'd like to stick with BIND_COMMAND_BUFFER, or maybe BIND_COMMAND_ARGS_BUFFER ... Or do you envision other uses of such buffer? It's possible that at some point we add a mechanism to let the driver store arbitrary commands into a buffer created by the st, or have resources used as arguments conditional rendering ... Lost of possiblities, but nothing concrete, and for the command lists like with D3D's deferred contexts we'd probably return opaque objects that can contain more auxiliary data. I like it to be more generic, but then it could turn out that there be different requirements on these command source buffers in the future ... I'm undecided now. Jose - Original Message - Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS. --- src/gallium/docs/source/screen.rst |2 ++ src/gallium/include/pipe/p_defines.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index c1a3c0b..f8cdded 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -306,6 +306,8 @@ resources might be created and handled quite differently. bound to the graphics pipeline as a shader resource. * ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be bound to the compute program as a shader resource. +* ``PIPE_BIND_COMMAND_BUFFER``: A buffer or that may be sourced by the + GPU command processor, like with indirect drawing. .. _pipe_usage: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 5b00acc..2b79f2a 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -315,6 +315,7 @@ enum pipe_flush_flags { #define PIPE_BIND_GLOBAL (1 18) /* set_global_binding */ #define PIPE_BIND_SHADER_RESOURCE (1 19) /* set_shader_resources */ #define PIPE_BIND_COMPUTE_RESOURCE (1 20) /* set_compute_resources */ +#define PIPE_BIND_COMMAND_BUFFER (1 21) /* pipe_draw_info.indirect */ /* The first two flags above were previously part of the amorphous * TEXTURE_USAGE, most of which are now descriptions of the ways a -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/4] gallium: add PIPE_BIND_COMMAND_BUFFER
I don't feel strongly about it anyway. Can always change it later. Jose - Original Message - On 04.04.2013 21:53, Christoph Bumiller wrote: On 04.04.2013 21:44, Jose Fonseca wrote: I think that PIPE_BIND_INDIRECT_BUFFER would be more self-descriptive. Marek suggested PIPE_BIND_DRAW_INDIRECT_BUFFER, but I think that's too specific because there's also a DISPATCH_INDIRECT buffer for compute shaders. And just INDIRECT_BUFFER without the _DRAW_ doesn't seem so self-descriptive if you're not thinking in the right context. I'd like to stick with BIND_COMMAND_BUFFER, or maybe BIND_COMMAND_ARGS_BUFFER ... Or do you envision other uses of such buffer? It's possible that at some point we add a mechanism to let the driver store arbitrary commands into a buffer created by the st, or have resources used as arguments conditional rendering ... Lost of possiblities, but nothing concrete, and for the command lists like with D3D's deferred contexts we'd probably return opaque objects that can contain more auxiliary data. I like it to be more generic, but then it could turn out that there be different requirements on these command source buffers in the future ... I'm undecided now. Jose - Original Message - Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS. --- src/gallium/docs/source/screen.rst |2 ++ src/gallium/include/pipe/p_defines.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index c1a3c0b..f8cdded 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -306,6 +306,8 @@ resources might be created and handled quite differently. bound to the graphics pipeline as a shader resource. * ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be bound to the compute program as a shader resource. +* ``PIPE_BIND_COMMAND_BUFFER``: A buffer or that may be sourced by the + GPU command processor, like with indirect drawing. .. _pipe_usage: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 5b00acc..2b79f2a 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -315,6 +315,7 @@ enum pipe_flush_flags { #define PIPE_BIND_GLOBAL (1 18) /* set_global_binding */ #define PIPE_BIND_SHADER_RESOURCE (1 19) /* set_shader_resources */ #define PIPE_BIND_COMPUTE_RESOURCE (1 20) /* set_compute_resources */ +#define PIPE_BIND_COMMAND_BUFFER (1 21) /* pipe_draw_info.indirect */ /* The first two flags above were previously part of the amorphous * TEXTURE_USAGE, most of which are now descriptions of the ways a -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/4] gallium: add PIPE_BIND_COMMAND_BUFFER
I think that PIPE_BIND_INDIRECT_BUFFER would be more self-descriptive. Or do you envision other uses of such buffer? Jose - Original Message - Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS. --- src/gallium/docs/source/screen.rst |2 ++ src/gallium/include/pipe/p_defines.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index c1a3c0b..f8cdded 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -306,6 +306,8 @@ resources might be created and handled quite differently. bound to the graphics pipeline as a shader resource. * ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be bound to the compute program as a shader resource. +* ``PIPE_BIND_COMMAND_BUFFER``: A buffer or that may be sourced by the + GPU command processor, like with indirect drawing. .. _pipe_usage: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 5b00acc..2b79f2a 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -315,6 +315,7 @@ enum pipe_flush_flags { #define PIPE_BIND_GLOBAL (1 18) /* set_global_binding */ #define PIPE_BIND_SHADER_RESOURCE (1 19) /* set_shader_resources */ #define PIPE_BIND_COMPUTE_RESOURCE (1 20) /* set_compute_resources */ +#define PIPE_BIND_COMMAND_BUFFER (1 21) /* pipe_draw_info.indirect */ /* The first two flags above were previously part of the amorphous * TEXTURE_USAGE, most of which are now descriptions of the ways a -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/4] gallium: add PIPE_BIND_COMMAND_BUFFER
On 04.04.2013 21:44, Jose Fonseca wrote: I think that PIPE_BIND_INDIRECT_BUFFER would be more self-descriptive. Or do you envision other uses of such buffer? It's possible that at some point we add a mechanism to let the driver store arbitrary commands into a buffer created by the st, or have resources used as arguments conditional rendering ... Lost of possiblities, but nothing concrete, and for the command lists like with D3D's deferred contexts we'd probably return opaque objects that can contain more auxiliary data. I like it to be more generic, but then it could turn out that there be different requirements on these command source buffers in the future ... I'm undecided now. Jose - Original Message - Intended for use with GL_ARB_draw_indirect's DRAW_INDIRECT_BUFFER target or for D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS. --- src/gallium/docs/source/screen.rst |2 ++ src/gallium/include/pipe/p_defines.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index c1a3c0b..f8cdded 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -306,6 +306,8 @@ resources might be created and handled quite differently. bound to the graphics pipeline as a shader resource. * ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be bound to the compute program as a shader resource. +* ``PIPE_BIND_COMMAND_BUFFER``: A buffer or that may be sourced by the + GPU command processor, like with indirect drawing. .. _pipe_usage: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 5b00acc..2b79f2a 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -315,6 +315,7 @@ enum pipe_flush_flags { #define PIPE_BIND_GLOBAL (1 18) /* set_global_binding */ #define PIPE_BIND_SHADER_RESOURCE (1 19) /* set_shader_resources */ #define PIPE_BIND_COMPUTE_RESOURCE (1 20) /* set_compute_resources */ +#define PIPE_BIND_COMMAND_BUFFER (1 21) /* pipe_draw_info.indirect */ /* The first two flags above were previously part of the amorphous * TEXTURE_USAGE, most of which are now descriptions of the ways a -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev