.address = bo->gtt_offset + offset,
.size_B = final_size,
.format = format,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = cpp,
.mocs = mocs(bo));
}
.size_B = MIN2(buffer_size,
res->bo->size - cbuf->data.offset),
.format = ISL_FORMAT_R32G32B32A32_FLOAT,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = 1,
.mocs = mocs(res->bo))
}
MIN2(buffer->buffer_size,
res->bo->size - buffer->buffer_offset),
.format = ISL_FORMAT_RAW,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = 1,
.mocs = mocs(res->bo));
} else {
*/
enum isl_format format;
+ /**
+ * The swizzle to use in the surface state
+ */
+ struct isl_swizzle swizzle;
+
uint32_t stride_B;
};
#endif
#if (GEN_GEN >= 8 || GEN_IS_HASWELL)
- s.ShaderChannelSelectRed = SCS_RED;
- s.ShaderChannelSelectGreen = SCS_GREEN;
- s.ShaderChannelSelectBlue = SCS_BLUE;
- s.ShaderChannelSelectAlpha = SCS_ALPHA;
+ s.ShaderChannelSelectRed = (enum GENX(ShaderChannelSelect)) info->swizzle.r;
+ s.ShaderChannelSelectGreen = (enum GENX(ShaderChannelSelect)) info->swizzle.g;
+ s.ShaderChannelSelectBlue = (enum GENX(ShaderChannelSelect)) info->swizzle.b;
+ s.ShaderChannelSelectAlpha = (enum GENX(ShaderChannelSelect)) info->swizzle.a;
#endif
GENX(RENDER_SURFACE_STATE_pack)(NULL, state, &s);
.mocs = device->default_mocs,
.size_B = range,
.format = format,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = stride);
}
.address = anv_address_physical(address),
.size_B = surface->isl.size_B,
.format = ISL_FORMAT_RAW,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = 1,
.mocs = anv_mocs_for_bo(device, address.bo));
state_inout->address = address,
reloc_flags),
.size_B = buffer_size,
.format = surface_format,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = pitch,
.mocs = brw_get_bo_mocs(devinfo, bo));
}