svga: whitespace fixes in svga_sampler_view.c
This commit is contained in:
parent
70c4cde453
commit
6ed8fd3d67
|
@ -48,9 +48,11 @@ svga_debug_describe_sampler_view(char *buf, const struct svga_sampler_view *sv)
|
||||||
{
|
{
|
||||||
char res[128];
|
char res[128];
|
||||||
debug_describe_resource(res, sv->texture);
|
debug_describe_resource(res, sv->texture);
|
||||||
util_sprintf(buf, "svga_sampler_view<%s,[%u,%u]>", res, sv->min_lod, sv->max_lod);
|
util_sprintf(buf, "svga_sampler_view<%s,[%u,%u]>",
|
||||||
|
res, sv->min_lod, sv->max_lod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct svga_sampler_view *
|
struct svga_sampler_view *
|
||||||
svga_get_tex_sampler_view(struct pipe_context *pipe,
|
svga_get_tex_sampler_view(struct pipe_context *pipe,
|
||||||
struct pipe_resource *pt,
|
struct pipe_resource *pt,
|
||||||
|
@ -58,10 +60,11 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
|
||||||
{
|
{
|
||||||
struct svga_context *svga = svga_context(pipe);
|
struct svga_context *svga = svga_context(pipe);
|
||||||
struct svga_screen *ss = svga_screen(pipe->screen);
|
struct svga_screen *ss = svga_screen(pipe->screen);
|
||||||
struct svga_texture *tex = svga_texture(pt);
|
struct svga_texture *tex = svga_texture(pt);
|
||||||
struct svga_sampler_view *sv = NULL;
|
struct svga_sampler_view *sv = NULL;
|
||||||
SVGA3dSurfaceFlags flags = SVGA3D_SURFACE_HINT_TEXTURE;
|
SVGA3dSurfaceFlags flags = SVGA3D_SURFACE_HINT_TEXTURE;
|
||||||
SVGA3dSurfaceFormat format = svga_translate_format(ss, pt->format, PIPE_BIND_SAMPLER_VIEW);
|
SVGA3dSurfaceFormat format = svga_translate_format(ss, pt->format,
|
||||||
|
PIPE_BIND_SAMPLER_VIEW);
|
||||||
boolean view = TRUE;
|
boolean view = TRUE;
|
||||||
|
|
||||||
assert(pt);
|
assert(pt);
|
||||||
|
@ -155,7 +158,8 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
|
||||||
sv->key.cachable = 0;
|
sv->key.cachable = 0;
|
||||||
sv->handle = tex->handle;
|
sv->handle = tex->handle;
|
||||||
debug_reference(&sv->reference,
|
debug_reference(&sv->reference,
|
||||||
(debug_reference_descriptor)svga_debug_describe_sampler_view, 0);
|
(debug_reference_descriptor)
|
||||||
|
svga_debug_describe_sampler_view, 0);
|
||||||
return sv;
|
return sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,13 +168,16 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
|
||||||
pipe_mutex_unlock(ss->tex_mutex);
|
pipe_mutex_unlock(ss->tex_mutex);
|
||||||
|
|
||||||
debug_reference(&sv->reference,
|
debug_reference(&sv->reference,
|
||||||
(debug_reference_descriptor)svga_debug_describe_sampler_view, 0);
|
(debug_reference_descriptor)
|
||||||
|
svga_debug_describe_sampler_view, 0);
|
||||||
|
|
||||||
return sv;
|
return sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view *v)
|
svga_validate_sampler_view(struct svga_context *svga,
|
||||||
|
struct svga_sampler_view *v)
|
||||||
{
|
{
|
||||||
struct svga_texture *tex = svga_texture(v->texture);
|
struct svga_texture *tex = svga_texture(v->texture);
|
||||||
unsigned numFaces;
|
unsigned numFaces;
|
||||||
|
@ -186,7 +193,7 @@ svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view *
|
||||||
|
|
||||||
age = tex->age;
|
age = tex->age;
|
||||||
|
|
||||||
if(tex->b.b.target == PIPE_TEXTURE_CUBE)
|
if (tex->b.b.target == PIPE_TEXTURE_CUBE)
|
||||||
numFaces = 6;
|
numFaces = 6;
|
||||||
else
|
else
|
||||||
numFaces = 1;
|
numFaces = 1;
|
||||||
|
@ -207,12 +214,13 @@ svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view *
|
||||||
v->age = age;
|
v->age = age;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
svga_destroy_sampler_view_priv(struct svga_sampler_view *v)
|
svga_destroy_sampler_view_priv(struct svga_sampler_view *v)
|
||||||
{
|
{
|
||||||
struct svga_texture *tex = svga_texture(v->texture);
|
struct svga_texture *tex = svga_texture(v->texture);
|
||||||
|
|
||||||
if(v->handle != tex->handle) {
|
if (v->handle != tex->handle) {
|
||||||
struct svga_screen *ss = svga_screen(v->texture->screen);
|
struct svga_screen *ss = svga_screen(v->texture->screen);
|
||||||
SVGA_DBG(DEBUG_DMA, "unref sid %p (sampler view)\n", v->handle);
|
SVGA_DBG(DEBUG_DMA, "unref sid %p (sampler view)\n", v->handle);
|
||||||
svga_screen_surface_destroy(ss, &v->key, &v->handle);
|
svga_screen_surface_destroy(ss, &v->key, &v->handle);
|
||||||
|
|
Loading…
Reference in New Issue