return D3D_OK;
}
device = This->base.device;
- pipe = NineDevice9_GetPipe(device);
info.type = PIPE_SHADER_FRAGMENT;
info.byte_code = pFunction;
info.projected = 0;
info.process_vertices = false;
+ pipe = nine_context_get_pipe_acquire(device);
hr = nine_translate_shader(device, &info, pipe);
+ nine_context_get_pipe_release(device);
if (FAILED(hr))
return hr;
This->byte_code.version = info.version;
DBG("This=%p\n", This);
if (This->base.device) {
- struct pipe_context *pipe = NineDevice9_GetPipe(This->base.device);
+ struct pipe_context *pipe = nine_context_get_pipe_multithread(This->base.device);
struct nine_shader_variant *var = &This->variant;
do {
info.const_b_base = NINE_CONST_B_BASE(device->max_ps_const_f) / 16;
info.byte_code = This->byte_code.tokens;
info.sampler_mask_shadow = key & 0xffff;
- info.sampler_ps1xtypes = key;
+ info.sampler_ps1xtypes = (key >> 16) & 0xffff;
info.fog_enable = device->context.rs[D3DRS_FOGENABLE];
info.fog_mode = device->context.rs[D3DRS_FOGTABLEMODE];
info.force_color_in_centroid = key >> 34 & 1;
struct NinePixelShader9 **ppOut,
const DWORD *pFunction, void *cso )
{
- NINE_DEVICE_CHILD_NEW(PixelShader9, ppOut, pDevice, pFunction, cso);
+ if (cso) { /* ff shader. Needs to start with bind count */
+ NINE_DEVICE_CHILD_BIND_NEW(PixelShader9, ppOut, pDevice, pFunction, cso);
+ } else {
+ NINE_DEVICE_CHILD_NEW(PixelShader9, ppOut, pDevice, pFunction, cso);
+ }
}