Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
446d0cbf
Commit
446d0cbf
authored
1 year ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
SL-19655 Clean up some missed "texture2D" vs "texture" (thanks Rye)
parent
c827d32e
No related branches found
No related tags found
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llrender/llshadermgr.cpp
+7
-7
7 additions, 7 deletions
indra/llrender/llshadermgr.cpp
with
7 additions
and
7 deletions
indra/llrender/llshadermgr.cpp
+
7
−
7
View file @
446d0cbf
...
@@ -678,13 +678,13 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
...
@@ -678,13 +678,13 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
{
{
switch (vary_texture_index)
switch (vary_texture_index)
{
{
case 0: ret = texture
2D
(tex0, texcoord); break;
case 0: ret = texture(tex0, texcoord); break;
case 1: ret = texture
2D
(tex1, texcoord); break;
case 1: ret = texture(tex1, texcoord); break;
case 2: ret = texture
2D
(tex2, texcoord); break;
case 2: ret = texture(tex2, texcoord); break;
.
.
.
.
.
.
case N: return texture
2D
(texN, texcoord); break;
case N: return texture(texN, texcoord); break;
}
}
return ret;
return ret;
...
@@ -711,7 +711,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
...
@@ -711,7 +711,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
if
(
texture_index_channels
==
1
)
if
(
texture_index_channels
==
1
)
{
//don't use flow control, that's silly
{
//don't use flow control, that's silly
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"return texture
2D
(tex0, texcoord);
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"return texture(tex0, texcoord);
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"}
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"}
\n
"
);
}
}
else
if
(
major_version
>
1
||
minor_version
>=
30
)
else
if
(
major_version
>
1
||
minor_version
>=
30
)
...
@@ -720,7 +720,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
...
@@ -720,7 +720,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
{
//switches are unreliable on some NVIDIA drivers
{
//switches are unreliable on some NVIDIA drivers
for
(
U32
i
=
0
;
i
<
texture_index_channels
;
++
i
)
for
(
U32
i
=
0
;
i
<
texture_index_channels
;
++
i
)
{
{
std
::
string
if_string
=
llformat
(
"
\t
%sif (vary_texture_index == %d) { return texture
2D
(tex%d, texcoord); }
\n
"
,
i
>
0
?
"else "
:
""
,
i
,
i
);
std
::
string
if_string
=
llformat
(
"
\t
%sif (vary_texture_index == %d) { return texture(tex%d, texcoord); }
\n
"
,
i
>
0
?
"else "
:
""
,
i
,
i
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
if_string
.
c_str
());
extra_code_text
[
extra_code_count
++
]
=
strdup
(
if_string
.
c_str
());
}
}
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"
\t
return vec4(1,0,1,1);
\n
"
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
"
\t
return vec4(1,0,1,1);
\n
"
);
...
@@ -735,7 +735,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
...
@@ -735,7 +735,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
//switch body
//switch body
for
(
S32
i
=
0
;
i
<
texture_index_channels
;
++
i
)
for
(
S32
i
=
0
;
i
<
texture_index_channels
;
++
i
)
{
{
std
::
string
case_str
=
llformat
(
"
\t\t
case %d: return texture
2D
(tex%d, texcoord);
\n
"
,
i
,
i
);
std
::
string
case_str
=
llformat
(
"
\t\t
case %d: return texture(tex%d, texcoord);
\n
"
,
i
,
i
);
extra_code_text
[
extra_code_count
++
]
=
strdup
(
case_str
.
c_str
());
extra_code_text
[
extra_code_count
++
]
=
strdup
(
case_str
.
c_str
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment