pvr: replace nop binary shader with run-time compiled shader
Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Matt Coster <matt.coster@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21536>
This commit is contained in:
@@ -70,6 +70,7 @@ pvr_files = files(
|
||||
|
||||
pvr_includes = [
|
||||
include_directories('usc/programs'),
|
||||
include_directories('usc'),
|
||||
include_directories('winsys'),
|
||||
libpowervr_pds_includes,
|
||||
]
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
#include "pvr_hardcode.h"
|
||||
#include "pvr_job_render.h"
|
||||
#include "pvr_limits.h"
|
||||
#include "pvr_nop_usc.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_tex_state.h"
|
||||
#include "pvr_types.h"
|
||||
#include "pvr_uscgen.h"
|
||||
#include "pvr_winsys.h"
|
||||
#include "rogue/rogue.h"
|
||||
#include "util/build_id.h"
|
||||
@@ -1525,15 +1525,19 @@ static VkResult pvr_device_init_nop_program(struct pvr_device *device)
|
||||
const uint32_t cache_line_size =
|
||||
rogue_get_slc_cache_line_size(&device->pdevice->dev_info);
|
||||
struct pvr_pds_kickusc_program program = { 0 };
|
||||
struct util_dynarray nop_usc_bin;
|
||||
uint32_t staging_buffer_size;
|
||||
uint32_t *staging_buffer;
|
||||
VkResult result;
|
||||
|
||||
pvr_uscgen_nop(&nop_usc_bin);
|
||||
|
||||
result = pvr_gpu_upload_usc(device,
|
||||
pvr_nop_usc_code,
|
||||
sizeof(pvr_nop_usc_code),
|
||||
util_dynarray_begin(&nop_usc_bin),
|
||||
nop_usc_bin.size,
|
||||
cache_line_size,
|
||||
&device->nop_program.usc);
|
||||
util_dynarray_fini(&nop_usc_bin);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2022 Imagination Technologies Ltd.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Auto-generated file - don't edit */
|
||||
|
||||
#ifndef PVR_NOP_USC_H
|
||||
#define PVR_NOP_USC_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t pvr_nop_usc_code[] = {
|
||||
0x04, 0x80, 0xEE, 0x00, 0xF2, 0xFF, 0xFF, 0xFF,
|
||||
};
|
||||
|
||||
#endif /* PVR_NOP_USC_H */
|
||||
Reference in New Issue
Block a user