Re: [PATCH 3/4] wined3d: Check resource types separately in check_fbo_compat.
On 16 May 2015 at 15:29, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
+static void delete_fbo_attachment(const struct wined3d_gl_info *gl_info, + enum wined3d_gl_resource_type d3d_type) +{ + switch (d3d_type) + { + case WINED3D_GL_RES_TYPE_TEX_1D: + gl_info->fbo_ops.glFramebufferTexture1D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_1D, 0, 0); + break; + + case WINED3D_GL_RES_TYPE_TEX_2D: + case WINED3D_GL_RES_TYPE_TEX_RECT: + gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + wined3d_gl_type_to_enum(d3d_type), 0, 0); + break; + + case WINED3D_GL_RES_TYPE_TEX_3D: + gl_info->fbo_ops.glFramebufferTexture3D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_3D, 0, 0, 0); + break; + + case WINED3D_GL_RES_TYPE_TEX_CUBE: + gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, 0); + break; + + case WINED3D_GL_RES_TYPE_BUFFER: + case WINED3D_GL_RES_TYPE_COUNT: + break; + } +} + This is kind of pointless. Any of the FramebufferTexture*() calls with a 0 texture will detach the current attachment. You shouldn't need to detach the current attachment before attaching a new one either, but I suppose the existing code already does that.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2015-05-19 um 12:28 schrieb Henri Verbeet:
This is kind of pointless. Any of the FramebufferTexture*() calls with a 0 texture will detach the current attachment. You shouldn't need to detach the current attachment before attaching a new one either, but I suppose the existing code already does that. I ran into issues without this on some driver (probably r200) and decided to copy the detaching from the post pixel shader blend code. It might have been due to a different bug, possibly in the driver. I'll check.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVW0p5AAoJEN0/YqbEcdMwHBAP/3XV8mQpfmYNVv6RqZ7Rbfm6 ajq6oWtMDEMrxzUgVpD5lChvsTP8I/ByXHwc/MpqX290frcT/iKxuE4dFIGP2buq NywSfM6bIaOQ3MF8E/MlX27s/cWlFa4OKo2WW87CtW6CoC8W3F+M+HQgKSXMx5fw Oln1/VgtoKJVba+pwOUUdQxhVWBRrYa64St0qhOl+dhvSXND5zARpC3Gw4XES5nM Gk7ooboBfY5j9tsfcqwu66OBbgZBCkmiB0Tra1z14+F9r0/nGgJbpN7L86Zd/PIf nRJ12kSufHN6Q8xTu0ImTIHDlGEL6mhH0GVnxx0paVeYBhQqxyVwyRmYgHNCaem/ GqahcpDwgaO2BLw5gZbRl0w9tSP9ZxjojXddHHNRDFdrHLPj36mUsiQQ31BA0TZg H4NE1nswAB2oM7Z/o34oNgwuymPbzXupfh3rcdnNydKtRYyTVythzAyt8MSl4LGe miykPakQerNtfW7c34Jn3gnwYAlgUUScqsm+v8L75fxrsDUo2cyBXtmQ7LQFn3tf 7mUgb9B0bnd71ssJA7/g+4u8ZYbMOzUmq82Z2QH0miP4vwngjjNVllu4AJ4EFFyq pmnxDhRNJiwQhRMa2MfPCEYGnV7YjUT7O23ZnxevDOrExwdutur33HjQcgLR0/qp 44zgijFP+NvgiXa2vkiB =pua/ -----END PGP SIGNATURE-----
participants (2)
-
Henri Verbeet -
Stefan Dösinger