Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5d421cae
Commit
5d421cae
authored
Mar 04, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get resource info from the texture in arbfp_blit_set().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb79ca5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-8
No files found.
dlls/wined3d/arb_program_shader.c
View file @
5d421cae
...
@@ -7658,21 +7658,21 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
...
@@ -7658,21 +7658,21 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
{
{
GLenum
shader
;
GLenum
shader
;
float
size
[
4
]
=
{(
float
)
surface
->
pow2Width
,
(
float
)
surface
->
pow2Height
,
1
.
0
f
,
1
.
0
f
};
float
size
[
4
]
=
{(
float
)
surface
->
pow2Width
,
(
float
)
surface
->
pow2Height
,
1
.
0
f
,
1
.
0
f
};
const
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
arbfp_blit_priv
*
priv
=
blit_priv
;
struct
arbfp_blit_priv
*
priv
=
blit_priv
;
enum
complex_fixup
fixup
;
enum
complex_fixup
fixup
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLenum
gl_texture_type
=
surface
->
container
->
target
;
struct
wine_rb_entry
*
entry
;
struct
wine_rb_entry
*
entry
;
struct
arbfp_blit_type
type
;
struct
arbfp_blit_type
type
;
struct
arbfp_blit_desc
*
desc
;
struct
arbfp_blit_desc
*
desc
;
struct
wined3d_color
float_color_key
[
2
];
struct
wined3d_color
float_color_key
[
2
];
if
(
is_complex_fixup
(
surfac
e
->
resource
.
format
->
color_fixup
))
if
(
is_complex_fixup
(
textur
e
->
resource
.
format
->
color_fixup
))
fixup
=
get_complex_fixup
(
surfac
e
->
resource
.
format
->
color_fixup
);
fixup
=
get_complex_fixup
(
textur
e
->
resource
.
format
->
color_fixup
);
else
else
fixup
=
COMPLEX_FIXUP_NONE
;
fixup
=
COMPLEX_FIXUP_NONE
;
switch
(
gl_texture_type
)
switch
(
texture
->
target
)
{
{
case
GL_TEXTURE_1D
:
case
GL_TEXTURE_1D
:
type
.
res_type
=
WINED3D_GL_RES_TYPE_TEX_1D
;
type
.
res_type
=
WINED3D_GL_RES_TYPE_TEX_1D
;
...
@@ -7695,7 +7695,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
...
@@ -7695,7 +7695,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
break
;
break
;
default:
default:
ERR
(
"Unexpected GL texture type %
x.
\n
"
,
gl_texture_type
);
ERR
(
"Unexpected GL texture type %
#x.
\n
"
,
texture
->
target
);
type
.
res_type
=
WINED3D_GL_RES_TYPE_TEX_2D
;
type
.
res_type
=
WINED3D_GL_RES_TYPE_TEX_2D
;
}
}
type
.
fixup
=
fixup
;
type
.
fixup
=
fixup
;
...
@@ -7713,7 +7713,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
...
@@ -7713,7 +7713,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
switch
(
fixup
)
switch
(
fixup
)
{
{
case
COMPLEX_FIXUP_NONE
:
case
COMPLEX_FIXUP_NONE
:
if
(
!
is_identity_fixup
(
surfac
e
->
resource
.
format
->
color_fixup
))
if
(
!
is_identity_fixup
(
textur
e
->
resource
.
format
->
color_fixup
))
FIXME
(
"Implement support for sign or swizzle fixups.
\n
"
);
FIXME
(
"Implement support for sign or swizzle fixups.
\n
"
);
shader
=
arbfp_gen_plain_shader
(
priv
,
gl_info
,
&
type
);
shader
=
arbfp_gen_plain_shader
(
priv
,
gl_info
,
&
type
);
break
;
break
;
...
@@ -7756,7 +7756,7 @@ err_out:
...
@@ -7756,7 +7756,7 @@ err_out:
}
}
if
(
fixup
==
COMPLEX_FIXUP_P8
)
if
(
fixup
==
COMPLEX_FIXUP_P8
)
upload_palette
(
surface
->
container
,
context
);
upload_palette
(
texture
,
context
);
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_FRAGMENT_PROGRAM_ARB
);
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_FRAGMENT_PROGRAM_ARB
);
checkGLcall
(
"glEnable(GL_FRAGMENT_PROGRAM_ARB)"
);
checkGLcall
(
"glEnable(GL_FRAGMENT_PROGRAM_ARB)"
);
...
@@ -7766,7 +7766,7 @@ err_out:
...
@@ -7766,7 +7766,7 @@ err_out:
checkGLcall
(
"glProgramLocalParameter4fvARB"
);
checkGLcall
(
"glProgramLocalParameter4fvARB"
);
if
(
type
.
use_color_key
)
if
(
type
.
use_color_key
)
{
{
wined3d_format_get_float_color_key
(
surfac
e
->
resource
.
format
,
color_key
,
float_color_key
);
wined3d_format_get_float_color_key
(
textur
e
->
resource
.
format
,
color_key
,
float_color_key
);
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ARBFP_BLIT_PARAM_COLOR_KEY_LOW
,
&
float_color_key
[
0
].
r
));
ARBFP_BLIT_PARAM_COLOR_KEY_LOW
,
&
float_color_key
[
0
].
r
));
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_EXTCALL
(
glProgramLocalParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
...
...
Write
Preview
Markdown
is supported
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