summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2017-09-18 21:02:53 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2017-09-18 21:02:53 +0300
commit0e9fb587fa267a296183b0d2093700e5fb53c950 (patch)
treea5ad2b64a3589c93d554706654264960d7547771 /indra/llrender/llshadermgr.cpp
parentc670ee835a9faa6b64c0ebc174a74a807528d0b6 (diff)
MAINT-7813 - 3D rendering broken on Windows in build 508618. 3D rendering starts before 2D login screen is cleared.
FIXED
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 07356940f1..e721ad93fa 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -779,11 +779,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
unsigned char flags = flag_write_to_out_of_extra_block_area;
- GLuint out_of_extra_block_counter = 0, start_shader_code = shader_code_count;
+ GLuint out_of_extra_block_counter = 0, start_shader_code = shader_code_count, file_lines_count = 0;
while(NULL != fgets((char *)buff, 1024, file)
&& shader_code_count < (LL_ARRAY_SIZE(shader_code_text) - LL_ARRAY_SIZE(extra_code_text)))
{
+ file_lines_count++;
+
bool extra_block_area_found = NULL != strstr((const char*)buff, "[EXTRA_CODE_HERE]");
if(extra_block_area_found && !(flag_extra_block_marker_was_found & flags))
@@ -840,6 +842,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
shader_code_text[n] = extra_code_text[n - start_shader_code];
}
+ if (file_lines_count < extra_code_count)
+ {
+ shader_code_count += extra_code_count;
+ }
+
extra_code_count = 0;
}