Re: [Mesa-dev] [PATCH 1/6] postprocess: simplify pp_free() code

2013-11-17 Thread Marek Olšák
For the series:

Reviewed-by: Marek Olšák marek.ol...@amd.com

Marek

On Sat, Nov 16, 2013 at 9:59 PM, Brian Paul bri...@vmware.com wrote:
 ---
  src/gallium/auxiliary/postprocess/pp_init.c |   27 
 +--
  1 file changed, 13 insertions(+), 14 deletions(-)

 diff --git a/src/gallium/auxiliary/postprocess/pp_init.c 
 b/src/gallium/auxiliary/postprocess/pp_init.c
 index a49a23d..bbebb5c 100644
 --- a/src/gallium/auxiliary/postprocess/pp_init.c
 +++ b/src/gallium/auxiliary/postprocess/pp_init.c
 @@ -169,11 +169,12 @@ pp_free(struct pp_queue_t *ppq)
  {
 unsigned int i, j;

 -   if (ppq) {
 -  pp_free_fbos(ppq);
 -   }
 +   if (!ppq)
 +  return;

 -   if (ppq  ppq-p) {
 +   pp_free_fbos(ppq);
 +
 +   if (ppq-p) {
if (ppq-p-pipe  ppq-filters  ppq-shaders) {
   for (i = 0; i  ppq-n_filters; i++) {
  unsigned int filter = ppq-filters[i];
 @@ -221,17 +222,15 @@ pp_free(struct pp_queue_t *ppq)
FREE(ppq-p);
 }

 -   if (ppq) {
 -  /*
 -   * Handle partial initialization for common resource destruction
 -   * in the create path.
 -   */
 -  FREE(ppq-filters);
 -  FREE(ppq-shaders);
 -  FREE(ppq-pp_queue);
 +   /*
 +* Handle partial initialization for common resource destruction
 +* in the create path.
 +*/
 +   FREE(ppq-filters);
 +   FREE(ppq-shaders);
 +   FREE(ppq-pp_queue);

 -  FREE(ppq);
 -   }
 +   FREE(ppq);

 pp_debug(Queue taken down.\n);
  }
 --
 1.7.10.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] [PATCH 1/6] postprocess: simplify pp_free() code

2013-11-16 Thread Brian Paul
---
 src/gallium/auxiliary/postprocess/pp_init.c |   27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/gallium/auxiliary/postprocess/pp_init.c 
b/src/gallium/auxiliary/postprocess/pp_init.c
index a49a23d..bbebb5c 100644
--- a/src/gallium/auxiliary/postprocess/pp_init.c
+++ b/src/gallium/auxiliary/postprocess/pp_init.c
@@ -169,11 +169,12 @@ pp_free(struct pp_queue_t *ppq)
 {
unsigned int i, j;
 
-   if (ppq) {
-  pp_free_fbos(ppq);
-   }
+   if (!ppq)
+  return;
 
-   if (ppq  ppq-p) {
+   pp_free_fbos(ppq);
+
+   if (ppq-p) {
   if (ppq-p-pipe  ppq-filters  ppq-shaders) {
  for (i = 0; i  ppq-n_filters; i++) {
 unsigned int filter = ppq-filters[i];
@@ -221,17 +222,15 @@ pp_free(struct pp_queue_t *ppq)
   FREE(ppq-p);
}
 
-   if (ppq) {
-  /*
-   * Handle partial initialization for common resource destruction
-   * in the create path.
-   */
-  FREE(ppq-filters);
-  FREE(ppq-shaders);
-  FREE(ppq-pp_queue);
+   /*
+* Handle partial initialization for common resource destruction
+* in the create path.
+*/
+   FREE(ppq-filters);
+   FREE(ppq-shaders);
+   FREE(ppq-pp_queue);
   
-  FREE(ppq);
-   }
+   FREE(ppq);
 
pp_debug(Queue taken down.\n);
 }
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev