[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 3/5] wined3d: Recognize SM4 dcl_immediateConstantBuffer.
From: Henri Verbeet <hverbeet () gmail ! com>
Date: 2016-01-29 14:35:15
Message-ID: CAOsNvwyyXgSq+xgpwPZUopgn+iz=O6W_8=DQFnLAKNBVMy-MwQ () mail ! gmail ! com
[Download RAW message or body]
On 29 January 2016 at 09:44, Józef Kucia <jkucia@codeweavers.com> wrote:
> + else if (ins.handler_idx == WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER)
> + {
> + struct wined3d_shader_immediate_constant_buffer *icb = \
> ins.declaration.icb; + if (reg_maps->icb)
> + {
> + ERR("Multiple immediate constant buffers.\n");
This would need to be a WARN or a FIXME, unless you ensure that it can
never happen in the front-end.
> + HeapFree(GetProcessHeap(), 0, reg_maps->icb);
> + }
> + if (!(reg_maps->icb = HeapAlloc(GetProcessHeap(), 0, \
> icb->element_count * sizeof(*icb->data)))) + {
> + ERR("Failed to allocate immediate constant buffer.\n");
> + return E_OUTOFMEMORY;
> + }
> + memcpy(reg_maps->icb, icb->data, icb->element_count * \
> sizeof(*icb->data)); + reg_maps->icb_size = icb->element_count / 4;
I think it shouldn't be necessary to copy the data,
shader->frontend_data should stay alive until the shader is destroyed.
> + FIXME("Unexpected size of immediate constant buffer %u.\n", len);
"Unexpected immediate constant buffer size %u.\n" sounds more natural
to me, but it's not a big deal.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic