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
61e581ab
Commit
61e581ab
authored
Dec 14, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the ps_compile_args structures to the shader generation code.
parent
936bec69
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
28 deletions
+28
-28
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
pixelshader.c
dlls/wined3d/pixelshader.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+23
-24
No files found.
dlls/wined3d/arb_program_shader.c
View file @
61e581ab
...
...
@@ -1879,7 +1879,7 @@ static void arbfp_add_sRGB_correction(SHADER_BUFFER *buffer, const char *fragcol
/* [0.0;1.0] clamping. Not needed, this is done implicitly */
}
static
GLuint
shader_arb_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
)
{
static
GLuint
shader_arb_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
const
shader_reg_maps
*
reg_maps
=
&
This
->
baseShader
.
reg_maps
;
CONST
DWORD
*
function
=
This
->
baseShader
.
function
;
...
...
dlls/wined3d/baseshader.c
View file @
61e581ab
...
...
@@ -1130,7 +1130,7 @@ static void shader_none_destroy(IWineD3DBaseShader *iface) {}
static
HRESULT
shader_none_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;}
static
void
shader_none_free
(
IWineD3DDevice
*
iface
)
{}
static
BOOL
shader_none_dirty_const
(
IWineD3DDevice
*
iface
)
{
return
FALSE
;}
static
GLuint
shader_none_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
)
{
static
GLuint
shader_none_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
)
{
FIXME
(
"NONE shader backend asked to generate a pixel shader
\n
"
);
return
0
;
}
...
...
dlls/wined3d/glsl_shader.c
View file @
61e581ab
...
...
@@ -3610,7 +3610,7 @@ static BOOL shader_glsl_dirty_const(IWineD3DDevice *iface) {
return
FALSE
;
}
static
GLuint
shader_glsl_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
)
{
static
GLuint
shader_glsl_generate_pshader
(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
)
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
const
struct
shader_reg_maps
*
reg_maps
=
&
This
->
baseShader
.
reg_maps
;
CONST
DWORD
*
function
=
This
->
baseShader
.
function
;
...
...
dlls/wined3d/pixelshader.c
View file @
61e581ab
...
...
@@ -423,6 +423,7 @@ static GLuint pixelshader_compile(IWineD3DPixelShaderImpl *This, const struct ps
CONST
DWORD
*
function
=
This
->
baseShader
.
function
;
GLuint
retval
;
SHADER_BUFFER
buffer
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
TRACE
(
"(%p) : function %p
\n
"
,
This
,
function
);
...
...
@@ -435,7 +436,7 @@ static GLuint pixelshader_compile(IWineD3DPixelShaderImpl *This, const struct ps
/* Generate the HW shader */
TRACE
(
"(%p) : Generating hardware program
\n
"
,
This
);
shader_buffer_init
(
&
buffer
);
retval
=
((
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
)
->
shader_backend
->
shader_generate_pshader
((
IWineD3DPixelShader
*
)
This
,
&
buffer
);
retval
=
device
->
shader_backend
->
shader_generate_pshader
((
IWineD3DPixelShader
*
)
This
,
&
buffer
,
args
);
shader_buffer_free
(
&
buffer
);
This
->
baseShader
.
is_compiled
=
TRUE
;
...
...
dlls/wined3d/wined3d_private.h
View file @
61e581ab
...
...
@@ -427,6 +427,28 @@ enum tex_types
tex_type_count
=
5
,
};
enum
vertexprocessing_mode
{
fixedfunction
,
vertexshader
,
pretransformed
};
struct
stb_const_desc
{
char
texunit
;
UINT
const_num
;
};
/* Stateblock dependent parameters which have to be hardcoded
* into the shader code
*/
struct
ps_compile_args
{
struct
color_fixup_desc
color_fixup
[
MAX_FRAGMENT_SAMPLERS
];
BOOL
srgb_correction
;
enum
vertexprocessing_mode
vp_mode
;
/* Projected textures(ps 1.0-1.3) */
/* Texture types(2D, Cube, 3D) in ps 1.x */
};
typedef
struct
{
const
SHADER_HANDLER
*
shader_instruction_handler_table
;
void
(
*
shader_select
)(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
);
...
...
@@ -440,7 +462,7 @@ typedef struct {
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
GLuint
(
*
shader_generate_pshader
)(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
);
GLuint
(
*
shader_generate_pshader
)(
IWineD3DPixelShader
*
iface
,
SHADER_BUFFER
*
buffer
,
const
struct
ps_compile_args
*
args
);
void
(
*
shader_generate_vshader
)(
IWineD3DVertexShader
*
iface
,
SHADER_BUFFER
*
buffer
);
void
(
*
shader_get_caps
)(
WINED3DDEVTYPE
devtype
,
const
WineD3D_GL_Info
*
gl_info
,
struct
shader_caps
*
caps
);
BOOL
(
*
shader_color_fixup_supported
)(
struct
color_fixup_desc
fixup
);
...
...
@@ -2347,29 +2369,6 @@ HRESULT IWineD3DVertexShaderImpl_CompileShader(IWineD3DVertexShader *iface);
/*****************************************************************************
* IDirect3DPixelShader implementation structure
*/
enum
vertexprocessing_mode
{
fixedfunction
,
vertexshader
,
pretransformed
};
struct
stb_const_desc
{
char
texunit
;
UINT
const_num
;
};
/* Stateblock dependent parameters which have to be hardcoded
* into the shader code
*/
struct
ps_compile_args
{
struct
color_fixup_desc
color_fixup
[
MAX_FRAGMENT_SAMPLERS
];
BOOL
srgb_correction
;
enum
vertexprocessing_mode
vp_mode
;
/* Projected textures(ps 1.0-1.3) */
/* Texture types(2D, Cube, 3D) in ps 1.x */
};
struct
ps_compiled_shader
{
struct
ps_compile_args
args
;
GLuint
prgId
;
...
...
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