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
c0be6047
Commit
c0be6047
authored
Mar 29, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Also move the rendertarget capability to the formats table.
parent
ef73fe5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
27 deletions
+20
-27
directx.c
dlls/wined3d/directx.c
+8
-16
utils.c
dlls/wined3d/utils.c
+11
-11
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+1
-0
No files found.
dlls/wined3d/directx.c
View file @
c0be6047
...
...
@@ -1935,24 +1935,16 @@ static BOOL CheckFilterCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
static
BOOL
CheckRenderTargetCapability
(
WINED3DFORMAT
AdapterFormat
,
WINED3DFORMAT
CheckFormat
)
{
UINT
Adapter
=
0
;
const
GlPixelFormatDesc
*
glDesc
;
const
StaticPixelFormatDesc
*
desc
=
getFormatDescEntry
(
CheckFormat
,
&
GLINFO_LOCATION
,
&
glDesc
);
/* Filter out non-RT formats */
switch
(
CheckFormat
)
{
/* Don't offer 8bit, windows doesn't either although we could emulate it */
case
WINED3DFMT_A8P8
:
case
WINED3DFMT_P8
:
/* Fail if we weren't able to get a description of the format */
if
(
!
desc
||
!
glDesc
)
return
FALSE
;
/* No DXTC render targets */
case
WINED3DFMT_DXT1
:
case
WINED3DFMT_DXT2
:
case
WINED3DFMT_DXT3
:
case
WINED3DFMT_DXT4
:
case
WINED3DFMT_DXT5
:
return
FALSE
;
default
:
break
;
}
/* Filter out non-RT formats */
if
(
!
(
glDesc
->
Flags
&
WINED3DFMT_FLAG_RENDERTARGET
))
return
FALSE
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_BACKBUFFER
)
{
WineD3D_PixelFormat
*
cfgs
=
Adapters
[
Adapter
].
cfgs
;
...
...
dlls/wined3d/utils.c
View file @
c0be6047
...
...
@@ -153,21 +153,21 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
,
0
},
/* IEEE formats */
{
WINED3DFMT_R32F
,
GL_RGB32F_ARB
,
GL_RGB32F_ARB
,
0
,
GL_RED
,
GL_FLOAT
,
0
},
,
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_G32R32F
,
0
,
0
,
0
,
0
,
0
,
0
},
,
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_A32B32G32R32F
,
GL_RGBA32F_ARB
,
GL_RGBA32F_ARB
,
0
,
GL_RGBA
,
GL_FLOAT
,
0
},
,
WINED3DFMT_FLAG_RENDERTARGET
},
/* Hmm? */
{
WINED3DFMT_CxV8U8
,
0
,
0
,
0
,
0
,
0
,
0
},
/* Float */
{
WINED3DFMT_R16F
,
GL_RGB16F_ARB
,
GL_RGB16F_ARB
,
0
,
GL_RED
,
GL_HALF_FLOAT_ARB
,
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_G16R16F
,
0
,
0
,
0
,
0
,
0
,
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_A16B16G16R16F
,
GL_RGBA16F_ARB
,
GL_RGBA16F_ARB
,
0
,
GL_RGBA
,
GL_HALF_FLOAT_ARB
,
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
/* Palettized formats */
{
WINED3DFMT_A8P8
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -175,13 +175,13 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
,
0
},
/* Standard ARGB formats */
{
WINED3DFMT_R8G8B8
,
GL_RGB8
,
GL_RGB8
,
0
,
GL_BGR
,
GL_UNSIGNED_BYTE
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_A8R8G8B8
,
GL_RGBA8
,
GL_SRGB8_ALPHA8_EXT
,
0
,
GL_BGRA
,
GL_UNSIGNED_INT_8_8_8_8_REV
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_X8R8G8B8
,
GL_RGB8
,
GL_SRGB8_EXT
,
0
,
GL_BGRA
,
GL_UNSIGNED_INT_8_8_8_8_REV
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_R5G6B5
,
GL_RGB5
,
GL_RGB5
,
GL_RGB8
,
GL_RGB
,
GL_UNSIGNED_SHORT_5_6_5
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
{
WINED3DFMT_X1R5G5B5
,
GL_RGB5
,
GL_RGB5_A1
,
0
,
GL_BGRA
,
GL_UNSIGNED_SHORT_1_5_5_5_REV
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
{
WINED3DFMT_A1R5G5B5
,
GL_RGB5_A1
,
GL_RGB5_A1
,
0
,
GL_BGRA
,
GL_UNSIGNED_SHORT_1_5_5_5_REV
...
...
@@ -207,7 +207,7 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
{
WINED3DFMT_A2R10G10B10
,
GL_RGBA
,
GL_RGBA
,
0
,
GL_BGRA
,
GL_UNSIGNED_INT_2_10_10_10_REV
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
{
WINED3DFMT_A16B16G16R16
,
GL_RGBA16_EXT
,
GL_RGBA16_EXT
,
0
,
GL_RGBA
,
GL_UNSIGNED_SHORT
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_RENDERTARGET
},
/* Luminance */
{
WINED3DFMT_L8
,
GL_LUMINANCE8
,
GL_SLUMINANCE8_EXT
,
0
,
GL_LUMINANCE
,
GL_UNSIGNED_BYTE
,
WINED3DFMT_FLAG_FILTERING
},
...
...
dlls/wined3d/wined3d_private_types.h
View file @
c0be6047
...
...
@@ -35,6 +35,7 @@ typedef enum {
#define WINED3DFMT_FLAG_FILTERING 0x2
#define WINED3DFMT_FLAG_DEPTH 0x4
#define WINED3DFMT_FLAG_STENCIL 0x8
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
/** DCL usage masks **/
#define WINED3DSP_DCL_USAGE_SHIFT 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