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
9413c89c
Commit
9413c89c
authored
May 08, 2006
by
Phil Costin
Committed by
Alexandre Julliard
May 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add check for GL Shading Language 100 Extension.
parent
c93239d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
directx.c
dlls/wined3d/directx.c
+34
-11
wined3d_gl.h
include/wine/wined3d_gl.h
+1
-0
No files found.
dlls/wined3d/directx.c
View file @
9413c89c
...
...
@@ -489,6 +489,9 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
glGetIntegerv
(
GL_MAX_TEXTURE_IMAGE_UNITS_ARB
,
&
gl_max
);
TRACE_
(
d3d_caps
)(
" FOUND: ARB Pixel Shader support - GL_MAX_TEXTURE_IMAGE_UNITS_ARB=%u
\n
"
,
gl_max
);
gl_info
->
max_samplers
=
min
(
MAX_SAMPLERS
,
gl_max
);
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_shading_language_100"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: GL Shading Language v100 support
\n
"
);
gl_info
->
supported
[
ARB_SHADING_LANGUAGE_100
]
=
TRUE
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_multisample"
)
==
0
)
{
TRACE_
(
d3d_caps
)(
" FOUND: ARB Multisample support
\n
"
);
gl_info
->
supported
[
ARB_MULTISAMPLE
]
=
TRUE
;
...
...
@@ -1674,28 +1677,48 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*
pCaps
->
MaxStreams
=
MAX_STREAMS
;
*
pCaps
->
MaxStreamStride
=
1024
;
if
(((
wined3d_settings
.
vs_mode
==
VS_HW
)
&&
GL_SUPPORT
(
ARB_VERTEX_PROGRAM
))
||
(
wined3d_settings
.
vs_mode
==
VS_SW
)
||
(
DeviceType
==
WINED3DDEVTYPE_REF
))
{
*
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
if
(
wined3d_settings
.
vs_mode
==
VS_HW
&&
GL_SUPPORT
(
ARB_SHADING_LANGUAGE_100
)
&&
DeviceType
!=
WINED3DDEVTYPE_REF
)
{
/* FIXME: Uncomment the line below and remove the line beneath that to set Vertex Shader 2.0+ capability */
/* *pCaps->VertexShaderVersion = D3DVS_VERSION(3,0); */
*
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
TRACE_
(
d3d_caps
)(
"Hardware Vertex Shaders versions 2.0+ enabled
\n
"
);
}
else
if
(
wined3d_settings
.
vs_mode
==
VS_HW
&&
GL_SUPPORT
(
ARB_VERTEX_PROGRAM
)
&&
DeviceType
!=
WINED3DDEVTYPE_REF
)
{
*
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
TRACE_
(
d3d_caps
)(
"Hardware Vertex Shader version 1.1 enabled
\n
"
);
}
else
if
(
wined3d_settings
.
vs_mode
==
VS_SW
||
DeviceType
==
WINED3DDEVTYPE_REF
)
{
*
pCaps
->
VertexShaderVersion
=
D3DVS_VERSION
(
1
,
1
);
TRACE_
(
d3d_caps
)(
"Software Vertex Shader version 1.1 enabled
\n
"
);
}
else
{
*
pCaps
->
VertexShaderVersion
=
0
;
TRACE_
(
d3d_caps
)(
"Vertex Shader functionality not available
\n
"
);
}
if
(
This
->
gl_info
.
gl_vendor
==
VENDOR_MESA
||
This
->
gl_info
.
gl_vendor
==
VENDOR_WINE
)
{
if
(
This
->
gl_info
.
gl_vendor
==
VENDOR_MESA
||
This
->
gl_info
.
gl_vendor
==
VENDOR_WINE
)
{
*
pCaps
->
MaxVertexShaderConst
=
95
;
}
else
{
*
pCaps
->
MaxVertexShaderConst
=
WINED3D_VSHADER_MAX_CONSTANTS
;
}
}
else
{
*
pCaps
->
VertexShaderVersion
=
0
;
*
pCaps
->
MaxVertexShaderConst
=
0
;
*
pCaps
->
MaxVertexShaderConst
=
WINED3D_VSHADER_MAX_CONSTANTS
;
}
if
((
wined3d_settings
.
ps_mode
==
PS_HW
)
&&
GL_SUPPORT
(
ARB_FRAGMENT_PROGRAM
)
&&
(
DeviceType
!=
WINED3DDEVTYPE_REF
))
{
if
(
wined3d_settings
.
ps_mode
==
PS_HW
&&
GL_SUPPORT
(
ARB_SHADING_LANGUAGE_100
)
&&
DeviceType
!=
WINED3DDEVTYPE_REF
)
{
/* FIXME: Uncomment the following line and remove the line beneath that to set Pixel Shader 2.0+ capability */
/* *pCaps->PixelShaderVersion = D3DPS_VERSION(3,0); */
*
pCaps
->
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
4
);
*
pCaps
->
PixelShader1xMaxValue
=
1
.
0
;
TRACE_
(
d3d_caps
)(
"Hardware Pixel Shaders versions 2.0+ enabled
\n
"
);
}
else
if
(
wined3d_settings
.
ps_mode
==
PS_HW
&&
GL_SUPPORT
(
ARB_FRAGMENT_PROGRAM
)
&&
DeviceType
!=
WINED3DDEVTYPE_REF
)
{
*
pCaps
->
PixelShaderVersion
=
D3DPS_VERSION
(
1
,
4
);
*
pCaps
->
PixelShader1xMaxValue
=
1
.
0
;
TRACE_
(
d3d_caps
)(
"Hardware Pixel Shaders version 1.4 enabled
\n
"
);
/* FIXME: Uncomment this when there is support for software Pixel Shader 1.4 and PS_SW is defined
} else if (wined3d_settings.ps_mode == PS_SW || DeviceType == WINED3DDEVTYPE_REF) {
*pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);
*pCaps->PixelShader1xMaxValue = 1.0;
TRACE_(d3d_caps)("Software Pixel Shader version 1.4 enabled\n"); */
}
else
{
*
pCaps
->
PixelShaderVersion
=
0
;
*
pCaps
->
PixelShader1xMaxValue
=
0
.
0
;
TRACE_
(
d3d_caps
)(
"Pixel Shader functionality not available
\n
"
);
}
/* TODO: ARB_FRAGMENT_PROGRAM_100 */
/* ------------------------------------------------
The following fields apply to d3d9 only
...
...
include/wine/wined3d_gl.h
View file @
9413c89c
...
...
@@ -1126,6 +1126,7 @@ typedef enum _GL_SupportedExt {
ARB_VERTEX_PROGRAM
,
ARB_VERTEX_BLEND
,
ARB_VERTEX_BUFFER_OBJECT
,
ARB_SHADING_LANGUAGE_100
,
/* EXT */
EXT_FOG_COORD
,
EXT_FRAMEBUFFER_OBJECT
,
...
...
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