summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/d3d/d3dcomm.h
diff options
context:
space:
mode:
author Westley M. Martinez <anikom15@gmail.com>2017-01-04 17:44:46 -0800
committer Westley M. Martinez <anikom15@gmail.com>2017-01-04 17:44:46 -0800
commit2b95c8e50bbfa22320ca8ddd04d3d94052a5c4ed (patch)
tree7495be650b35a2c5e2f65e0a9ed4eb81debd838e /src/osd/modules/render/d3d/d3dcomm.h
parentfad07814a01d724c0025aca39c771f13e74cff50 (diff)
Change cached texture format to floating point.
hlsl/phosphor.fx: Remove hacks ini/presets/raster.ini, ini/presets/vector-mono.ini, ini/presets/vector.ini: Tweak presets src/osd/modules/render/d3d/d3dcomm.h, src/osd/modules/render/d3d/d3dhlsl.cpp, src/osd/modules/render/drawd3d.cpp: Change cache texture format to floating point for precise for phosphor and ghosting shaders.
Diffstat (limited to 'src/osd/modules/render/d3d/d3dcomm.h')
-rw-r--r--src/osd/modules/render/d3d/d3dcomm.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/osd/modules/render/d3d/d3dcomm.h b/src/osd/modules/render/d3d/d3dcomm.h
index 38b93adb7ac..98a720988c0 100644
--- a/src/osd/modules/render/d3d/d3dcomm.h
+++ b/src/osd/modules/render/d3d/d3dcomm.h
@@ -220,7 +220,7 @@ class d3d_render_target
{
public:
// construction/destruction
- d3d_render_target(): target_width(0), target_height(0), width(0), height(0), screen_index(0), bloom_count(0)
+ d3d_render_target(): target_width(0), target_height(0), width(0), height(0), screen_index(0), bloom_count(0), cache_index(0)
{
for (int index = 0; index < MAX_BLOOM_COUNT; index++)
{
@@ -234,16 +234,16 @@ public:
source_surface[index] = nullptr;
target_texture[index] = nullptr;
target_surface[index] = nullptr;
+ cache_texture[index] = nullptr;
+ cache_surface[index] = nullptr;
}
-
- cache_texture = nullptr;
- cache_surface = nullptr;
}
~d3d_render_target();
bool init(renderer_d3d9 *d3d, int source_width, int source_height, int target_width, int target_height, int screen_index);
int next_index(int index) { return ++index > 1 ? 0 : index; }
+ int next_cache_index() { cache_index = ++cache_index > 1 ? 0 : cache_index; return cache_index; }
// real target dimension
int target_width;
@@ -260,8 +260,8 @@ public:
IDirect3DSurface9 *source_surface[2];
IDirect3DTexture9 *source_texture[2];
- IDirect3DSurface9 *cache_surface;
- IDirect3DTexture9 *cache_texture;
+ IDirect3DSurface9 *cache_surface[2];
+ IDirect3DTexture9 *cache_texture[2];
IDirect3DSurface9 *bloom_surface[MAX_BLOOM_COUNT];
IDirect3DTexture9 *bloom_texture[MAX_BLOOM_COUNT];
@@ -269,6 +269,8 @@ public:
float bloom_dims[MAX_BLOOM_COUNT][2];
int bloom_count;
+
+ int cache_index;
};
#endif