Re: [PATCH 5/5] wined3d: Pass the state and private data to shader_select
On 12 May 2013 15:30, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
/* Disable shaders */ - device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); + device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE, + NULL, device->shader_priv);
I think that's a bit questionable. Passing NULL state happens to work for this set of arguments, but I don't think we want that to be part of the interface.
Am 13.05.2013 um 15:28 schrieb Henri Verbeet <hverbeet(a)gmail.com>:
On 12 May 2013 15:30, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
/* Disable shaders */ - device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); + device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE, + NULL, device->shader_priv);
I think that's a bit questionable. Passing NULL state happens to work for this set of arguments, but I don't think we want that to be part of the interface. I think it's the best solution. SetupForBlit does not have any state information, which makes sense because it has no relation with d3d draws. Even if we grab some state information from somewhere (e.g. the stateblock, or the command stream) there's no guarantee that it is set up in a useful way. It could e.g. have a NULL vdecl or mismatched vertex/pixel shaders etc.
On 13 May 2013 16:39, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
Am 13.05.2013 um 15:28 schrieb Henri Verbeet <hverbeet(a)gmail.com>:
On 12 May 2013 15:30, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
/* Disable shaders */ - device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); + device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE, + NULL, device->shader_priv);
I think that's a bit questionable. Passing NULL state happens to work for this set of arguments, but I don't think we want that to be part of the interface. I think it's the best solution. SetupForBlit does not have any state information, which makes sense because it has no relation with d3d draws. Even if we grab some state information from somewhere (e.g. the stateblock, or the command stream) there's no guarantee that it is set up in a useful way. It could e.g. have a NULL vdecl or mismatched vertex/pixel shaders etc.
Maybe. Perhaps we could also just get rid of WINED3D_SHADER_MODE_NONE and add a separate call instead.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2013-05-13 17:44, schrieb Henri Verbeet:
Maybe. Perhaps we could also just get rid of WINED3D_SHADER_MODE_NONE and add a separate call instead. Sounds like a plan, as we're never using WINED3D_SHADER_MODE_NONE for just one shader type. Please also skip patch 3, I'll adjust shader_arb_load_constants_internal according to your comments for patch 4.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRkTOVAAoJEN0/YqbEcdMwIykP/2DuAxxc7ypiXFO2IDoRqmXZ 1DZFEua0317+IcBx6hHc3lqgsh9ibg3+2slE/CrWHwKCWlxzUvct6Y2j91tk8R5W 2DDFW1J67mJS/oLJzofI+HrghISC0J+jfKwdTI61IEp37G49JZCD7dnxr9rlEJDn rb3p0taPdvXYKB3goZiVQo60wf/FIDE7PxZ2/oGtYKVhuFfsmU3DurYeMyeQkMgd Ma5iHDhZP/V5zn36+kc7nxAFdw231Znne5LkHcnBKgRGwBGGf/uJCSmg2SDYUzSM gAbDiWatF4NL2J1XG3zuHTKNHDL0BI5WUyBTtM85BkcwkRJN3DsLzcTZadrsXcsj BuibjYJD3M4TFHWMsX1GFTf/g5msM08Wqk/cHt2Gm5vDmmRMOcEo5EQRGOcSjrg1 Xl5pUTSCyb9ykUB8idW/1dUGP75XpS5xQEtgLryuZVw4xOORe0izsoA6UadHMzLz KqnH9SQKhm9LKkfIKCGWLAMAcEXn5MwMcq/okkQZmUiVbRZ/RIy1Pba19+tHfv79 CJPTrgdNl3KMNF2/a4qcqyv71tgcutYjfdufvRdRLZrmmM9lVfD0CJ4U1/OafKC+ EEDKBgbrNUuZIsN+ebuxTJjfChPx4UrFD7WkSCI1AvSZhjchaobXN2/tNjElt/8j n2PzMahocsGHnD6BmzbG =CHRn -----END PGP SIGNATURE-----
participants (3)
-
Henri Verbeet -
Stefan Dösinger -
Stefan Dösinger