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
c51db63b
Commit
c51db63b
authored
Jun 16, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Require ARB_shader_texture_lod for SM3.
parent
11bf170c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-19
No files found.
dlls/wined3d/glsl_shader.c
View file @
c51db63b
...
...
@@ -4927,25 +4927,9 @@ static BOOL shader_glsl_dirty_const(void)
static
void
shader_glsl_get_caps
(
const
struct
wined3d_gl_info
*
gl_info
,
struct
shader_caps
*
caps
)
{
/* NVIDIA GeForce 6 / 7 or ATI R4xx / R5xx cards with GLSL support
* support SM3, but older NVIDIA / ATI models with GLSL support only
* support SM2. In case of NVIDIA we can detect SM3 support based on the
* version of NV_vertex_program / NV_fragment_program. For other cards we
* try to detect SM3 based on the maximum number of native fragment
* program instructions. PS2.0 requires at least 96 instructions, 2.0a/b
* goes up to 512. Assume that if the number of instructions is 512 or
* less we have to do with SM2 hardware. NOTE: SM3 requires 512 or more
* instructions but ATI and NVIDIA offer more than that (1024 vs 4096) on
* their most basic SM3 hardware.
*
* ARB_shader_texture_lod is a requirement for SM3 (texldd). Ideally we'd
* make this a hard requirement, but the extension is still somewhat new,
* and relatively few SM3 shaders actually depend on it. For the moment
* just use it to enable SM3 (20110423). */
if
((
gl_info
->
supported
[
NV_VERTEX_PROGRAM3
]
&&
gl_info
->
supported
[
NV_FRAGMENT_PROGRAM2
])
||
gl_info
->
limits
.
arb_ps_instructions
>
512
||
gl_info
->
supported
[
ARB_SHADER_TEXTURE_LOD
]
||
gl_info
->
supported
[
EXT_GPU_SHADER4
])
/* ARB_shader_texture_lod or EXT_gpu_shader4 is required for the SM3
* texldd and texldl instructions. */
if
(
gl_info
->
supported
[
ARB_SHADER_TEXTURE_LOD
]
||
gl_info
->
supported
[
EXT_GPU_SHADER4
])
{
caps
->
VertexShaderVersion
=
WINED3DVS_VERSION
(
3
,
0
);
caps
->
PixelShaderVersion
=
WINED3DPS_VERSION
(
3
,
0
);
...
...
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