[Mesa-dev] [PATCH 1/2] anv: Fix vkCmdFillBuffer()

Józef Kucia joseph.kucia at gmail.com
Mon Oct 2 19:41:19 UTC 2017


On Mon, Oct 2, 2017 at 9:19 PM, Lionel Landwerlin
<lionel.g.landwerlin at intel.com> wrote:
> I guess it makes things clearer.
> Does this fix something?

Yes, it fixes buffer fills. After the change buffers are filled with
uint32_t values instead of uint8_t or uint16_t values.

Before the change, when the fill value is 0xabcdef buffers are filled
with 0xcdefcdef or 0xefefefef.

>
>
> On 02/10/17 18:58, Józef Kucia wrote:
>>
>> The vkCmdFillBuffer() command fills a buffer with an uint32_t value.
>> ---
>>   src/intel/vulkan/anv_blorp.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
>> index 8d0c275248..a8ebdb384c 100644
>> --- a/src/intel/vulkan/anv_blorp.c
>> +++ b/src/intel/vulkan/anv_blorp.c
>> @@ -533,8 +533,8 @@ isl_format_for_size(unsigned size_B)
>>      switch (size_B) {
>>      case 1:  return ISL_FORMAT_R8_UINT;
>>      case 2:  return ISL_FORMAT_R8G8_UINT;
>> -   case 4:  return ISL_FORMAT_R8G8B8A8_UINT;
>> -   case 8:  return ISL_FORMAT_R16G16B16A16_UINT;
>> +   case 4:  return ISL_FORMAT_R32_UINT;
>> +   case 8:  return ISL_FORMAT_R32G32_UINT;
>>      case 16: return ISL_FORMAT_R32G32B32A32_UINT;
>>      default:
>>         unreachable("Not a power-of-two format size");
>
>
>


More information about the mesa-dev mailing list