diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_basic_shader.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 18 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_sample_query.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 20 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_basic_vert.glsl | 4 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl | 2 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_vertex.glsl | 4 |
13 files changed, 37 insertions, 37 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 2427301782c..cc1a26f57f7 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -40,7 +40,7 @@ struct Image; struct ImageUser; struct PreviewImage; struct Gwn_VertBuf; - + struct GPUFrameBuffer; typedef struct GPUTexture GPUTexture; diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c index 620a06ae606..b720bed2d0c 100644 --- a/source/blender/gpu/intern/gpu_basic_shader.c +++ b/source/blender/gpu/intern/gpu_basic_shader.c @@ -169,7 +169,7 @@ void GPU_basic_shaders_init(void) void GPU_basic_shaders_exit(void) { int i; - + for (i = 0; i < GPU_SHADER_OPTION_COMBINATIONS; i++) if (GPU_MATERIAL_STATE.cached_shaders[i]) GPU_shader_free(GPU_MATERIAL_STATE.cached_shaders[i]); @@ -238,7 +238,7 @@ static GPUShader *gpu_basic_shader(int options) geom_glsl, NULL, defines); - + if (shader) { /* set texture map to first texture unit */ if (options & (GPU_SHADER_TEXTURE_2D | GPU_SHADER_TEXTURE_RECT)) { diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 9d2a0ceef4d..df8dbb03284 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -460,7 +460,7 @@ void GPU_pbvh_grid_buffers_update( vbo_index += 1; } } - + if (!buffers->smooth) { for (j = 0; j < key->grid_size - 1; j++) { for (k = 0; k < key->grid_size - 1; k++) { @@ -865,7 +865,7 @@ void GPU_pbvh_bmesh_buffers_update( fmask += BM_ELEM_CD_GET_FLOAT(v[i], cd_vert_mask_offset); } fmask /= 3.0f; - + for (i = 0; i < 3; i++) { gpu_bmesh_vert_to_buffer_copy__gwn( v[i], buffers->vert_buf, diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index f182f08f4a9..22665e2c0bf 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -159,7 +159,7 @@ static int gpu_str_prefix(const char *str, const char *prefix) str++; prefix++; } - + return (*prefix == '\0'); } @@ -278,7 +278,7 @@ static char *gpu_generate_function_prototyps(GHash *hash) GPUFunction *function; char *name, *prototypes; int a; - + /* automatically generate function prototypes to add to the top of the * generated code, to avoid have to add the actual code & recompile all */ ghi = BLI_ghashIterator_new(hash); @@ -716,7 +716,7 @@ static void codegen_call_functions(DynStr *ds, ListBase *nodes, GPUOutput *final for (node = nodes->first; node; node = node->next) { BLI_dynstr_appendf(ds, "\t%s(", node->name); - + for (input = node->inputs.first; input; input = input->next) { if (input->source == GPU_SOURCE_TEX) { BLI_dynstr_appendf(ds, "samp%d", input->texid); @@ -1230,7 +1230,7 @@ void GPU_pass_unbind(GPUPass *pass, ListBase *inputs) if (input->ima || input->prv) input->tex = NULL; } - + GPU_shader_unbind(); } @@ -1251,7 +1251,7 @@ static void gpu_node_link_free(GPUNodeLink *link) if (link->users < 0) fprintf(stderr, "GPU_node_link_free: negative refcount\n"); - + if (link->users == 0) { if (link->output) link->output->link = NULL; @@ -1292,7 +1292,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const GPUType return; } } - + input = MEM_callocN(sizeof(GPUInput), "GPUInput"); input->node = node; @@ -1683,10 +1683,10 @@ GPUNodeLink *GPU_cube_map(Image *ima, ImageUser *iuser, bool is_data) GPUNodeLink *GPU_image_preview(PreviewImage *prv) { GPUNodeLink *link = GPU_node_link_create(); - + link->image = GPU_NODE_LINK_IMAGE_PREVIEW; link->ptr1 = prv; - + return link; } @@ -1870,7 +1870,7 @@ static void gpu_nodes_tag(GPUNodeLink *link) node = link->output->node; if (node->tag) return; - + node->tag = true; for (input = node->inputs.first; input; input = input->next) if (input->link) diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c index 75576c35f51..f86da2eb064 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.c +++ b/source/blender/gpu/intern/gpu_framebuffer.c @@ -680,7 +680,7 @@ GPUOffScreen *GPU_offscreen_create(int width, int height, int samples, bool dept if (!GPU_framebuffer_check_valid(ofs->fb, err_out)) { GPU_offscreen_free(ofs); gpuPopAttrib(); - return NULL; + return NULL; } GPU_framebuffer_restore(); @@ -698,7 +698,7 @@ void GPU_offscreen_free(GPUOffScreen *ofs) GPU_texture_free(ofs->color); if (ofs->depth) GPU_texture_free(ofs->depth); - + MEM_freeN(ofs); } diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 1d3c1d13be3..7b3750c970b 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -87,7 +87,7 @@ struct GPUMaterial { const void *engine_type; /* attached engine type */ int options; /* to identify shader variations (shadow, probe, world background...) */ - + /* for creating the material */ ListBase nodes; GPUNodeLink *outlink; @@ -670,6 +670,6 @@ void GPU_materials_free(void) for (wo = G.main->world.first; wo; wo = wo->id.next) GPU_material_free(&wo->gpumaterial); - + GPU_material_free(&defmaterial.gpumaterial); } diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 953f6daf805..fecac55087f 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -36,7 +36,7 @@ #include "GPU_select.h" #include "GPU_extensions.h" #include "GPU_glew.h" - + #include "MEM_guardedalloc.h" #include "BLI_rect.h" diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c index 919ccbea2e9..4520025ea7f 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.c +++ b/source/blender/gpu/intern/gpu_select_sample_query.c @@ -37,7 +37,7 @@ #include "GPU_select.h" #include "GPU_extensions.h" #include "GPU_glew.h" - + #include "MEM_guardedalloc.h" #include "BLI_rect.h" diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index 2068c5a6a75..8c978be81c1 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -189,11 +189,11 @@ static void shader_print_errors(const char *task, const char *log, const char ** c = pos + 1; line++; } - + fprintf(stderr, "%s", c); } } - + fprintf(stderr, "%s\n", log); } diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 4da9acdee4f..dadd8c441f4 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -736,10 +736,10 @@ GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap) { GPUTexture *tex = prv->gputexture[0]; GLuint bindcode = 0; - + if (tex) bindcode = tex->bindcode; - + /* this binds a texture, so that's why we restore it to 0 */ if (bindcode == 0) { GPU_create_gl_tex(&bindcode, prv->rect[0], NULL, prv->w[0], prv->h[0], GL_TEXTURE_2D, mipmap, 0, NULL); @@ -758,9 +758,9 @@ GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap) tex->target_base = GL_TEXTURE_2D; tex->format = -1; tex->components = -1; - + prv->gputexture[0] = tex; - + if (!glIsTexture(tex->bindcode)) { GPU_print_error_debug("Blender Texture Not Loaded"); } @@ -770,13 +770,13 @@ GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap) glBindTexture(GL_TEXTURE_2D, tex->bindcode); glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w); glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &h); - + tex->w = w; tex->h = h; } - + glBindTexture(GL_TEXTURE_2D, 0); - + return tex; } @@ -1104,7 +1104,7 @@ void GPU_texture_free(GPUTexture *tex) if (tex->refcount < 0) fprintf(stderr, "GPUTexture: negative refcount\n"); - + if (tex->refcount == 0) { for (int i = 0; i < GPU_TEX_MAX_FBO_ATTACHED; ++i) { if (tex->fb[i] != NULL) { @@ -1116,7 +1116,7 @@ void GPU_texture_free(GPUTexture *tex) if (BLI_thread_is_main()) { gpu_texture_delete(tex); } - else{ + else { BLI_mutex_lock(&g_orphan_lock); BLI_addtail(&g_orphaned_tex, BLI_genericNodeN(tex)); BLI_mutex_unlock(&g_orphan_lock); @@ -1133,7 +1133,7 @@ void GPU_texture_delete_orphans(void) { BLI_mutex_lock(&g_orphan_lock); LinkData *link; - while((link = BLI_pophead(&g_orphaned_tex))) { + while ((link = BLI_pophead(&g_orphaned_tex))) { gpu_texture_delete((GPUTexture *)link->data); MEM_freeN(link); } diff --git a/source/blender/gpu/shaders/gpu_shader_basic_vert.glsl b/source/blender/gpu/shaders/gpu_shader_basic_vert.glsl index dbf6c267f14..bc940222f85 100644 --- a/source/blender/gpu/shaders/gpu_shader_basic_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_basic_vert.glsl @@ -58,8 +58,8 @@ void main() #elif !defined(GPU_ATI) // Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA // graphic cards, while on ATI it can cause a software fallback. - gl_ClipVertex = co; -#endif + gl_ClipVertex = co; +#endif #ifdef USE_COLOR #ifdef DRAW_LINE diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl index 1dd5bf42b25..86b338e528e 100644 --- a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl @@ -59,4 +59,4 @@ void main() #else vert_dof_final(); #endif -}
\ No newline at end of file +} diff --git a/source/blender/gpu/shaders/gpu_shader_vertex.glsl b/source/blender/gpu/shaders/gpu_shader_vertex.glsl index 2a6c137e195..e297c242044 100644 --- a/source/blender/gpu/shaders/gpu_shader_vertex.glsl +++ b/source/blender/gpu/shaders/gpu_shader_vertex.glsl @@ -103,8 +103,8 @@ void main() #elif !defined(GPU_ATI) // Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA // graphic cards, while on ATI it can cause a software fallback. - gl_ClipVertex = co; -#endif + gl_ClipVertex = co; +#endif #ifdef USE_OPENSUBDIV outpt.v.position = co; |