Re: [Mesa-dev] [PATCH 03/17] mesa: fix deletion of inactive bound transform feedback object
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 30/07/15 07:02, Samuel Iglesias Gonsálvez wrote: > On Wed, 2015-07-29 at 12:31 -0700, Ian Romanick wrote: >> On 07/29/2015 07:01 AM, Samuel Iglesias Gonsalvez wrote: >>> When a transform feedback object is bound and not active, the >>> OpenGL ES 3.0 and GL_ARB_transform_feedback2 specs don't >>> explicitly disallow its deletion. Only the deletion of the >>> default framebuffer object is >> ^^^ transform feedback >> > > OK > >>> forbidden. >> >> This sounds like a spec bug or a test bug. I've submitted a >> Khronos spec bug. I'd like to get some input from Khronos first. >> Assuming this is the correct behavior, this patch looks good. >> > > OK, thanks. I will wait for the answer then. > Is there any news? Sam > Sam > >>> This patch follows what it is done for glDeleteTextures(), >>> i.e. the binding reverts to 0 (the default framebuffer >>> object). >>> >>> Fixes: >>> >>> dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback >>> >>> Signed-off-by: Samuel Iglesias Gonsalvez >>>--- src/mesa/main/transformfeedback.c | >>> 13 - 1 file changed, 12 insertions(+), 1 >>> deletion(-) >>> >>> diff --git a/src/mesa/main/transformfeedback.c >>> b/src/mesa/main/transformfeedback.c index 103011c..9944c62 >>> 100644 --- a/src/mesa/main/transformfeedback.c +++ >>> b/src/mesa/main/transformfeedback.c @@ -96,8 +96,19 @@ >>> reference_transform_feedback_object(struct >>> gl_transform_feedback_object **ptr, assert(oldObj->RefCount > >>> 0); oldObj->RefCount--; >>> >>> + /* If the transform feedback object to delete (obj == >>> NULL) is bound + * then revert the binding to the default >>> transform feedback object. + */ + >>> GET_CURRENT_CONTEXT(ctx); + if (ctx && obj == NULL && + >>> oldObj == ctx->TransformFeedback.CurrentObject && + >>> oldObj != ctx->TransformFeedback.DefaultObject) { + >>> ctx->TransformFeedback.CurrentObject = NULL; + >>> reference_transform_feedback_object( >>> ->TransformFeedback.CurrentObject, + >>> ctx ->TransformFeedback.DefaultObject); + } + if >>> (oldObj->RefCount == 0) { - GET_CURRENT_CONTEXT(ctx); >>> if (ctx) ctx->Driver.DeleteTransformFeedback(ctx, oldObj); } >>> >> >> >> >> >> ___ mesa-dev mailing >> list mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCAAGBQJWAn+XAAoJEH/0ujLxfcNDw1AQAMZAFuMeedA+UbB1kPbJrE7f rs34UOXd2Pj85C1dEchaa0nK89Qd5SvfdiynMnLQMnu/1E3VqJxguOW27OlOQa5X gGKeiDnDrq/Njm5FKSmEUHKyWJWtbONGXQwXeXkGP/LmHEinK9I2ZnLMM7gkB5QD RmQKtnfJyXKGDdJFSLJwoAIx/zv78oWjxXLm+tp9mOzTTl8LCNiQtuxKXMTuAOzK rg0TyqAbTPd4OhAt+HAtZaruaI7TgOc+Vk8wqYSmDZzS10vlmRjtlGwkADEx2fd1 RbRmcJLZyYztxaJn+Zik6QWdI3xaNxNOZ8GcDiHaIkD0mf6USo8rl4XRk3h6KVWc Brk3uR3J7+rkxFTvONZVFhQeRQ8/abhncKt9P4jGjFlvATUJRyg+V57FiL1FGiAB bKhoFM1skHfLvTkYLv8kqqGlowK8CHjN5IvwfU6LVjjaQo0TpltX4iNoUxB9IzFv fCeg2RovHb2Zwrdj2aAtnowrB2+/NHvPzn+VIwTpGvEt/wYcK+nuByUpMQOyRKSY gcHNNDcF8ob8KciPlAdsHGw4k3+qorzMaE4K34YnmsBF34XSLxtbEl6oGawKSBts KfO35NZOzLTezTWZ75I9DazgCpFN9Bz20ugpwYUaEgRzmGLfOheYeNinx1KFrjK9 eDXT+xb8YSnyuIbMKo/A =eEws -END PGP SIGNATURE- ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 03/17] mesa: fix deletion of inactive bound transform feedback object
On 07/29/2015 07:01 AM, Samuel Iglesias Gonsalvez wrote: When a transform feedback object is bound and not active, the OpenGL ES 3.0 and GL_ARB_transform_feedback2 specs don't explicitly disallow its deletion. Only the deletion of the default framebuffer object is ^^^ transform feedback forbidden. This sounds like a spec bug or a test bug. I've submitted a Khronos spec bug. I'd like to get some input from Khronos first. Assuming this is the correct behavior, this patch looks good. This patch follows what it is done for glDeleteTextures(), i.e. the binding reverts to 0 (the default framebuffer object). Fixes: dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/transformfeedback.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 103011c..9944c62 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -96,8 +96,19 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr, assert(oldObj-RefCount 0); oldObj-RefCount--; + /* If the transform feedback object to delete (obj == NULL) is bound + * then revert the binding to the default transform feedback object. + */ + GET_CURRENT_CONTEXT(ctx); + if (ctx obj == NULL + oldObj == ctx-TransformFeedback.CurrentObject + oldObj != ctx-TransformFeedback.DefaultObject) { + ctx-TransformFeedback.CurrentObject = NULL; + reference_transform_feedback_object(ctx-TransformFeedback.CurrentObject, + ctx-TransformFeedback.DefaultObject); + } + if (oldObj-RefCount == 0) { - GET_CURRENT_CONTEXT(ctx); if (ctx) ctx-Driver.DeleteTransformFeedback(ctx, oldObj); } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 03/17] mesa: fix deletion of inactive bound transform feedback object
On Wed, 2015-07-29 at 12:31 -0700, Ian Romanick wrote: On 07/29/2015 07:01 AM, Samuel Iglesias Gonsalvez wrote: When a transform feedback object is bound and not active, the OpenGL ES 3.0 and GL_ARB_transform_feedback2 specs don't explicitly disallow its deletion. Only the deletion of the default framebuffer object is ^^^ transform feedback OK forbidden. This sounds like a spec bug or a test bug. I've submitted a Khronos spec bug. I'd like to get some input from Khronos first. Assuming this is the correct behavior, this patch looks good. OK, thanks. I will wait for the answer then. Sam This patch follows what it is done for glDeleteTextures(), i.e. the binding reverts to 0 (the default framebuffer object). Fixes: dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/transformfeedback.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 103011c..9944c62 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -96,8 +96,19 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr, assert(oldObj-RefCount 0); oldObj-RefCount--; + /* If the transform feedback object to delete (obj == NULL) is bound + * then revert the binding to the default transform feedback object. + */ + GET_CURRENT_CONTEXT(ctx); + if (ctx obj == NULL + oldObj == ctx-TransformFeedback.CurrentObject + oldObj != ctx-TransformFeedback.DefaultObject) { + ctx-TransformFeedback.CurrentObject = NULL; + reference_transform_feedback_object(ctx -TransformFeedback.CurrentObject, + ctx -TransformFeedback.DefaultObject); + } + if (oldObj-RefCount == 0) { - GET_CURRENT_CONTEXT(ctx); if (ctx) ctx-Driver.DeleteTransformFeedback(ctx, oldObj); } signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/17] mesa: fix deletion of inactive bound transform feedback object
When a transform feedback object is bound and not active, the OpenGL ES 3.0 and GL_ARB_transform_feedback2 specs don't explicitly disallow its deletion. Only the deletion of the default framebuffer object is forbidden. This patch follows what it is done for glDeleteTextures(), i.e. the binding reverts to 0 (the default framebuffer object). Fixes: dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/transformfeedback.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 103011c..9944c62 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -96,8 +96,19 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr, assert(oldObj-RefCount 0); oldObj-RefCount--; + /* If the transform feedback object to delete (obj == NULL) is bound + * then revert the binding to the default transform feedback object. + */ + GET_CURRENT_CONTEXT(ctx); + if (ctx obj == NULL + oldObj == ctx-TransformFeedback.CurrentObject + oldObj != ctx-TransformFeedback.DefaultObject) { + ctx-TransformFeedback.CurrentObject = NULL; + reference_transform_feedback_object(ctx-TransformFeedback.CurrentObject, + ctx-TransformFeedback.DefaultObject); + } + if (oldObj-RefCount == 0) { - GET_CURRENT_CONTEXT(ctx); if (ctx) ctx-Driver.DeleteTransformFeedback(ctx, oldObj); } -- 2.4.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev