summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/pixelshader9.h
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-05-12 21:56:04 +0200
committerAxel Davy <[email protected]>2015-08-21 22:21:47 +0200
commit8f39ffc11e8b6fdf7c940f9c1853a362a886977a (patch)
tree8a8df571e545e5593dd219fb5dda7442bec35a68 /src/gallium/state_trackers/nine/pixelshader9.h
parent69de5d626f2e67e74e4de94ce13f7ac50fa52161 (diff)
st/nine: Finish Fog implementation
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/pixelshader9.h')
-rw-r--r--src/gallium/state_trackers/nine/pixelshader9.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/pixelshader9.h b/src/gallium/state_trackers/nine/pixelshader9.h
index 69eb87b2e27..5d1f5041c47 100644
--- a/src/gallium/state_trackers/nine/pixelshader9.h
+++ b/src/gallium/state_trackers/nine/pixelshader9.h
@@ -33,7 +33,7 @@ struct nine_lconstf;
struct NinePixelShader9
{
struct NineUnknown base;
- struct nine_shader_variant variant;
+ struct nine_shader_variant64 variant;
struct {
const DWORD *tokens;
@@ -50,10 +50,10 @@ struct NinePixelShader9
uint64_t ff_key[6];
void *ff_cso;
- uint32_t last_key;
+ uint64_t last_key;
void *last_cso;
- uint32_t next_key;
+ uint64_t next_key;
};
static inline struct NinePixelShader9 *
NinePixelShader9( void *data )
@@ -67,7 +67,7 @@ NinePixelShader9_UpdateKey( struct NinePixelShader9 *ps,
{
uint16_t samplers_shadow;
uint32_t samplers_ps1_types;
- uint32_t key;
+ uint64_t key;
BOOL res;
if (unlikely(ps->byte_code.version < 0x20)) {
@@ -85,6 +85,11 @@ NinePixelShader9_UpdateKey( struct NinePixelShader9 *ps,
key = samplers_shadow & ps->sampler_mask;
}
+ if (ps->byte_code.version < 0x30) {
+ key |= ((uint64_t)state->rs[D3DRS_FOGENABLE]) << 32;
+ key |= ((uint64_t)state->rs[D3DRS_FOGTABLEMODE]) << 33;
+ }
+
res = ps->last_key != key;
if (res)
ps->next_key = key;