Re: [Mesa-dev] [PATCH 2/2] gallium/noop: fix sampler views

2017-06-12 Thread Nicolai Hähnle

For the series:

Reviewed-by: Nicolai Hähnle 

On 09.06.2017 15:49, Marek Olšák wrote:

From: Marek Olšák 

---
  src/gallium/drivers/noop/noop_state.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/noop/noop_state.c 
b/src/gallium/drivers/noop/noop_state.c
index 46d99ab..80cfae8 100644
--- a/src/gallium/drivers/noop/noop_state.c
+++ b/src/gallium/drivers/noop/noop_state.c
@@ -69,21 +69,24 @@ static void *noop_create_sampler_state(struct pipe_context 
*ctx,
  }
  
  static struct pipe_sampler_view *noop_create_sampler_view(struct pipe_context *ctx,

struct 
pipe_resource *texture,
const struct 
pipe_sampler_view *state)
  {
 struct pipe_sampler_view *sampler_view = CALLOC_STRUCT(pipe_sampler_view);
  
 if (!sampler_view)

return NULL;
+
 /* initialize base object */
+   *sampler_view = *state;
+   sampler_view->texture = NULL;
 pipe_resource_reference(&sampler_view->texture, texture);
 pipe_reference_init(&sampler_view->reference, 1);
 sampler_view->context = ctx;
 return sampler_view;
  }
  
  static struct pipe_surface *noop_create_surface(struct pipe_context *ctx,

  struct pipe_resource *texture,
  const struct pipe_surface 
*surf_tmpl)
  {




--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] gallium/noop: fix sampler views

2017-06-09 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/drivers/noop/noop_state.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/noop/noop_state.c 
b/src/gallium/drivers/noop/noop_state.c
index 46d99ab..80cfae8 100644
--- a/src/gallium/drivers/noop/noop_state.c
+++ b/src/gallium/drivers/noop/noop_state.c
@@ -69,21 +69,24 @@ static void *noop_create_sampler_state(struct pipe_context 
*ctx,
 }
 
 static struct pipe_sampler_view *noop_create_sampler_view(struct pipe_context 
*ctx,
   struct pipe_resource 
*texture,
   const struct 
pipe_sampler_view *state)
 {
struct pipe_sampler_view *sampler_view = CALLOC_STRUCT(pipe_sampler_view);
 
if (!sampler_view)
   return NULL;
+
/* initialize base object */
+   *sampler_view = *state;
+   sampler_view->texture = NULL;
pipe_resource_reference(&sampler_view->texture, texture);
pipe_reference_init(&sampler_view->reference, 1);
sampler_view->context = ctx;
return sampler_view;
 }
 
 static struct pipe_surface *noop_create_surface(struct pipe_context *ctx,
 struct pipe_resource *texture,
 const struct pipe_surface 
*surf_tmpl)
 {
-- 
2.7.4

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