Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mesa
mesa
Commits
ccf9669c
Commit
ccf9669c
authored
May 04, 2017
by
Timothy Arceri
Browse files
mesa: small texture targetIndex tidy up
Reviewed-by:
Eric Anholt
<
eric@anholt.net
>
parent
68cd0e20
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mesa/main/texobj.c
View file @
ccf9669c
...
...
@@ -329,13 +329,13 @@ _mesa_initialize_texture_object( struct gl_context *ctx,
*/
static
void
finish_texture_init
(
struct
gl_context
*
ctx
,
GLenum
target
,
struct
gl_texture_object
*
obj
)
struct
gl_texture_object
*
obj
,
int
targetIndex
)
{
GLenum
filter
=
GL_LINEAR
;
assert
(
obj
->
Target
==
0
);
obj
->
Target
=
target
;
obj
->
TargetIndex
=
_mesa_tex_target_to_index
(
ctx
,
target
)
;
obj
->
TargetIndex
=
targetIndex
;
assert
(
obj
->
TargetIndex
<
NUM_TEXTURE_TARGETS
);
switch
(
target
)
{
...
...
@@ -1649,13 +1649,12 @@ _mesa_BindTexture( GLenum target, GLuint texName )
{
GET_CURRENT_CONTEXT
(
ctx
);
struct
gl_texture_object
*
newTexObj
=
NULL
;
GLint
targetIndex
;
if
(
MESA_VERBOSE
&
(
VERBOSE_API
|
VERBOSE_TEXTURE
))
_mesa_debug
(
ctx
,
"glBindTexture %s %d
\n
"
,
_mesa_enum_to_string
(
target
),
(
GLint
)
texName
);
targetIndex
=
_mesa_tex_target_to_index
(
ctx
,
target
);
int
targetIndex
=
_mesa_tex_target_to_index
(
ctx
,
target
);
if
(
targetIndex
<
0
)
{
_mesa_error
(
ctx
,
GL_INVALID_ENUM
,
"glBindTexture(target = %s)"
,
_mesa_enum_to_string
(
target
));
...
...
@@ -1684,7 +1683,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
return
;
}
if
(
newTexObj
->
Target
==
0
)
{
finish_texture_init
(
ctx
,
target
,
newTexObj
);
finish_texture_init
(
ctx
,
target
,
newTexObj
,
targetIndex
);
}
}
else
{
...
...
Bugzilla Migration User
@bugzilla-migration
mentioned in issue
#1347
·
Sep 25, 2019
mentioned in issue
#1347
mentioned in issue #1347
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment